Variable NumberFormattersConst

NumberFormatters: {
    float: ((float?, options?) => string);
    floatWithDecimal: ((float?, options?) => string);
    integer: ((integer, options?) => string);
    large: ((value, options?) => string);
    percentage: ((percentage, options?) => string);
} = ...

Type declaration

  • float: ((float?, options?) => string)

    Formats the given number into a float string representation. No decimal will be displayed of not needed.

    Param: percentage

    The number to format.

    Param: options

    The formatter options.

    Returns

    either a float or integer string representation of the given number.

      • (float?, options?): string
      • Formats the given number into a float string representation. No decimal will be displayed of not needed.

        Parameters

        Returns string

        either a float or integer string representation of the given number.

  • floatWithDecimal: ((float?, options?) => string)

    Formats the given number into a float string representation with forced decimal.

    Param: percentage

    The number to format.

    Param: options

    The formatter options.

    Returns

    a float string representation of the given number.

      • (float?, options?): string
      • Formats the given number into a float string representation with forced decimal.

        Parameters

        Returns string

        a float string representation of the given number.

  • integer: ((integer, options?) => string)

    Formats the given number into a integer string representation.

    Param: percentage

    The number to format.

    Param: options

    The formatter options.

    Returns

    either a float or integer string representation of the given number.

      • (integer, options?): string
      • Formats the given number into a integer string representation.

        Parameters

        Returns string

        either a float or integer string representation of the given number.

  • large: ((value, options?) => string)

    Formats the given number into a string representation handling thousand separators.

    Param: value

    The number to format.

    Param: options

    The formatter options.

    Returns

    the string representation of the given number.

      • (value, options?): string
      • Formats the given number into a string representation handling thousand separators.

        Parameters

        Returns string

        the string representation of the given number.

  • percentage: ((percentage, options?) => string)

    Formats the given number into a percentage string representation.

    Param: percentage

    The number to format.

    Param: options

    The formatter options.

    Returns

    a percentage string representation of the given number.

      • (percentage, options?): string
      • Formats the given number into a percentage string representation.

        Parameters

        • percentage: number

          The number to format.

        • Optional options: INumberFormatOptions

          The formatter options.

        Returns string

        a percentage string representation of the given number.

Generated using TypeDoc