@formatjs/intl-pluralrules
Version:
Polyfill for Intl.PluralRules
13 lines (12 loc) • 695 B
JavaScript
/* @generated */
// prettier-ignore
if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function') {
Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["one","few","many","other"],"ordinal":["few","other"]},"fn":function(n, ord) {
var s = String(n).split('.'), t0 = Number(s[0]) == n, n10 = t0 && s[0].slice(-1), n100 = t0 && s[0].slice(-2);
if (ord) return (n10 == 2 || n10 == 3) && n100 != 12 && n100 != 13 ? 'few' : 'other';
return n10 == 1 && n100 != 11 ? 'one'
: (n10 >= 2 && n10 <= 4) && (n100 < 12 || n100 > 14) ? 'few'
: t0 && n10 == 0 || (n10 >= 5 && n10 <= 9) || (n100 >= 11 && n100 <= 14) ? 'many'
: 'other';
}},"locale":"be"})
}