Options supported by format.

interface FormatOptions {
    currency?: string;
    format?: string;
    fractionalDigits?: number;
    locale?: string;
    unit?: string;
}

Properties

currency?: string
format?: string
fractionalDigits?: number
locale?: string

The locale to use when formatting the number. If not specified, the current locale is used (see locale module).

unit?: string

The unit to use when formatting the number. If specified any additional supplied format will be ignored. Example: 'kilometer', 'mile', 'celsius' etc. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf#supported_unit_identifiers.