number() function
This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
number
accepts a number, BigInt or string representing a JSON number as input and formats it with the same options as Intl.NumberFormat. It also supports plural category selection via Intl.PluralRules.
Signature:
export declare function number({ localeMatcher, locales, source }: MessageFunctionContext, options: Record<string, unknown>, input?: unknown): MessageNumber;
Parameters
Parameter | Type | Description |
---|---|---|
{ localeMatcher, locales, source } | MessageFunctionContext | |
options | Record<string, unknown> | |
input | unknown | (Optional) |
Returns: