@formatjs/intl-pluralrules
Version:
Polyfill for Intl.PluralRules
10 lines (9 loc) • 506 B
JavaScript
/* @generated */
// prettier-ignore
if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function') {
Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["one","other"],"ordinal":["many","other"]},"fn":function(n, ord) {
var s = String(n).split('.'), v0 = !s[1], t0 = Number(s[0]) == n;
if (ord) return (n == 11 || n == 8 || (t0 && n >= 80 && n <= 89) || (t0 && n >= 800 && n <= 899)) ? 'many' : 'other';
return n == 1 && v0 ? 'one' : 'other';
}},"locale":"lij"})
}