MCPcopy
hub / github.com/formatjs/formatjs / loadNumbers

Function loadNumbers

packages/intl-numberformat/scripts/extract-numbers.ts:131–144  ·  view source on GitHub ↗
(locale: string)

Source from the content-addressed store, hash-verified

129}
130
131async function loadNumbers(locale: string): Promise<RawNumberData> {
132 try {
133 return extractNumbers(
134 (
135 (await import(`cldr-numbers-full/main/${locale}/numbers.json`, {
136 with: {type: 'json'},
137 })) as {default: typeof NumbersData}
138 ).default.main[locale as 'ar'].numbers
139 )
140 } catch (e) {
141 console.error('Issue processing numbers data for ' + locale)
142 throw e
143 }
144}
145
146export async function generateDataForLocales(
147 locales: string[] = AVAILABLE_LOCALES.availableLocales.full

Callers

nothing calls this directly

Calls 2

extractNumbersFunction · 0.85
errorMethod · 0.80

Tested by

no test coverage detected