MCPcopy
hub / github.com/formatjs/formatjs / shouldPolyfill

Function shouldPolyfill

packages/intl-displaynames/should-polyfill.ts:64–72  ·  view source on GitHub ↗
(locale = 'en')

Source from the content-addressed store, hash-verified

62}
63
64export function shouldPolyfill(locale = 'en'): string | true | undefined {
65 try {
66 if (_shouldPolyfillWithoutLocale() || !supportedLocalesOf(locale)) {
67 return match([locale], supportedLocales, 'en')
68 }
69 } catch {
70 return true
71 }
72}

Callers 2

polyfill.tsFile · 0.70

Calls 3

matchFunction · 0.90
supportedLocalesOfFunction · 0.70

Tested by

no test coverage detected