(locale = 'en')
| 10 | } |
| 11 | |
| 12 | export function shouldPolyfill(locale = 'en'): string | undefined { |
| 13 | if ( |
| 14 | typeof Intl === 'undefined' || |
| 15 | !('PluralRules' in Intl) || |
| 16 | new Intl.PluralRules('en', {minimumFractionDigits: 2} as any).select(1) === |
| 17 | 'one' || |
| 18 | !supportedLocalesOf(locale) |
| 19 | ) { |
| 20 | return locale ? match([locale], supportedLocales, 'en') : undefined |
| 21 | } |
| 22 | } |
no test coverage detected