Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Number

Extends the built-in javascript Number object's prototype.

Various Format.Config methods can be called in order to access the additional definitions, see each method for more details.

Hierarchy

  • Number

Index

Methods

isCounting

  • isCounting(): boolean

isEven

  • isEven(): boolean

isInteger

  • isInteger(): boolean

isWhole

  • isWhole(): boolean

toExponentialMinMax

  • toExponentialMinMax(minDigits: number, maxDigits: number): string
  • Returns the best fitting formatted value, returned by the Number.toExponential method, given a minimum and/or maximum digits precision.

    Must call Format.Config.addUtilsToPrototype to be defined.

    Parameters

    • minDigits: number

      The minimum number of digits to include in the format.

    • maxDigits: number

      The maximum number of digits to include in the format.

    Returns string

toFixedMinMax

  • toFixedMinMax(minDigits: number, maxDigits: number): string
  • Returns the best fitting formatted value, returned by the Number.toFixed method, given a minimum and/or maximum digits precision.

    Must call Format.Config.addUtilsToPrototype to be defined.

    Parameters

    • minDigits: number

      The minimum number of digits to include in the format.

    • maxDigits: number

      The maximum number of digits to include in the format.

    Returns string

toPrecisionMinMax

  • toPrecisionMinMax(minDigits: number, maxDigits: number): string
  • Returns the best fitting formatted value, returned by the Number.toPrecision method, given a minimum and/or maximum digits precision.

    Must call Format.Config.addUtilsToPrototype to be defined.

    Parameters

    • minDigits: number

      The minimum number of digits to include in the format.

    • maxDigits: number

      The maximum number of digits to include in the format.

    Returns string

toString

  • Converts the numeric value of this instance to its equivalent string representation, using the specified format.

    Must call Format.Config.addToStringOverload to be defined.

    Parameters

    • format: string

      A standard or custom numeric format string.

    Returns string

    The formatted numeric value.

  • Converts the numeric value of this instance to its equivalent string representation using the specified culture-specific format information.

    Must call Format.Config.addToStringOverload to be defined.

    Parameters

    • provider: FormatProvider

      An object that supplies culture-specific formatting information.

    Returns string

    The formatted numeric value.

  • Converts the numeric value of this instance to its equivalent string representation using the specified format and culture-specific format information.

    Must call Format.Config.addToStringOverload to be defined.

    Parameters

    • format: string

      A standard or custom numeric format string.

    • provider: FormatProvider

      An object that supplies culture-specific formatting information.

    Returns string

    The formatted numeric value.

Generated using TypeDoc