Creates a number parsing function based on the specified locale and specifier.
The locale to use for parsing.
The parsing specifier string.
A function that parses a number according to the specified locale and specifier.
Creates a number parsing function based on the specified locale and options.
The locale to use for parsing.
The parsing options.
A function that parses a number according to the specified locale and options.
Creates a number parsing function based on the specified locale and options.
The locale to use for parsing.
OptionaloptionsOrSpecifier: string | NumberFormatOptionsThe parsing options or specifier string.
A function that parses a number according to the specified locale and options.
If the number format specifier is invalid.
Number format specifiers:
n or N: Parses a number with grouping separators.cUSD or CEUR: Formats a number as currency with the specified currency code (USD).d or D: Parses an integer number as an integer with the specified number of digits.e or E: Parses a number in scientific notation with the specified number of digits.f or F: Parses a number as a fixed-point number with the specified number of digits.g or G: Parses a number in compact notation with the specified number of significant digits.p or P: Parses a number as a percentage with the specified number of digits.b or B: Parses an integer number in binary.x or X: Parses an integer in hexadecimal.r or R: Parses a number as a round trip format (using parseFloat).
Creates a number parsing function based on the specified locale and options or specifier.
Param: locale
The locale to use for parsing.
Param: optionsOrSpecifier
The parsing options or specifier string.
Returns
A function that parses a number according to the specified locale and options or specifier.
Throws
If the currency code in the specifier is invalid.
Throws
If the number format specifier is invalid.