@formatjs/intl-pluralrules
Version:
Polyfill for Intl.PluralRules
12 lines (11 loc) • 448 B
JavaScript
/* @generated */
// prettier-ignore
if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function') {
Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["one","few","other"],"ordinal":["other"]},"fn":function(n, ord) {
var s = String(n).split('.'), t0 = Number(s[0]) == n;
if (ord) return 'other';
return n >= 0 && n <= 1 ? 'one'
: (t0 && n >= 2 && n <= 10) ? 'few'
: 'other';
}},"locale":"shi"})
}