MCPcopy Index your code
hub / github.com/formatjs/formatjs / toLocaleString

Function toLocaleString

packages/intl-numberformat/to_locale_string.ts:9–16  ·  view source on GitHub ↗
(
  x: number | bigint,
  locales?: string | string[],
  options?: NumberFormatOptions
)

Source from the content-addressed store, hash-verified

7 * https://tc39.es/ecma402/#sup-number.prototype.tolocalestring
8 */
9export function toLocaleString(
10 x: number | bigint,
11 locales?: string | string[],
12 options?: NumberFormatOptions
13): string {
14 const numberFormat = new NumberFormat(locales, options)
15 return numberFormat.format(x)
16}

Callers 1

misc.test.tsFile · 0.50

Calls 1

formatMethod · 0.95

Tested by

no test coverage detected