Hierarchy

  • CurrencyFormatter

Constructors

Properties

formatter: NumberFormat

Methods

  • Format a number value to currency according to locale standards and currency ISO code

    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 currency

  • Format a number value to currency, 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 currency, each with a type and value

  • Get placeholder for positive and negative formatted currency per locale

    Returns string

    a string with formatted currency with placeholders positive; negative

  • Get a list of supported currency codes

    Returns string[]

    an array of sorted ISO 4217 currency codes that are supported at Procore.

  • Parse a formatted currency value into a primitive number

    Parameters

    • value: string

      The formatted currency value to be parsed

    Returns number

    A parsed, primitive number without formatting

Generated using TypeDoc