Hierarchy

  • NumberFormatter

Constructors

Properties

formatter: NumberFormat
percent: undefined | Percent

Methods

  • Format a number value according to locale standards

    Parameters

    • value: string | number

      The value to format. Numbers larger than 15 digits should be passed as a string to maintain precision.

    Returns string

    The formatted number

  • Format a number value, separated into its individual parts

    Parameters

    • value: number

      The value to format

    Returns NumberFormatPart[]

    An ordered array of objects representing the parts of the formatted number, each with a type and value

  • Parse a formatted value into a primitive number

    Parameters

    • value: string

      The formatted value to be parsed

    Returns number

    A parsed, primitive number without formatting

Generated using TypeDoc