UNPKG

@formatjs/intl-pluralrules

Version:
40 lines (39 loc) 1.74 kB
/* @generated */ // prettier-ignore if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function') { Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["one","other"],"ordinal":["other"]},"fn":function(num, isOrdinal, exponent = 0) { const numStr = String(num); const parts = numStr.split("."); const integerPart = parts[0]; const decimalPart = parts[1] || ""; const n = Math.abs(parseFloat(numStr)); const i = Math.floor(Math.abs(parseFloat(integerPart))); const v = decimalPart.length; const f = v > 0 ? parseInt(decimalPart, 10) : 0; if (isOrdinal) { } else { if ((n === 0 || n === 1) || i === 0 && f === 1) return "one"; } return "other"; },"pluralRanges":{"cardinal":{"one_one":"one","one_other":"other","other_one":"other","other_other":"other"},"ordinal":{}}},"locale":"si"}) } else { (globalThis.__FORMATJS_PLURALRULES_DATA__ = globalThis.__FORMATJS_PLURALRULES_DATA__ || []).push({"data":{"categories":{"cardinal":["one","other"],"ordinal":["other"]},"fn":function(num, isOrdinal, exponent = 0) { const numStr = String(num); const parts = numStr.split("."); const integerPart = parts[0]; const decimalPart = parts[1] || ""; const n = Math.abs(parseFloat(numStr)); const i = Math.floor(Math.abs(parseFloat(integerPart))); const v = decimalPart.length; const f = v > 0 ? parseInt(decimalPart, 10) : 0; if (isOrdinal) { } else { if ((n === 0 || n === 1) || i === 0 && f === 1) return "one"; } return "other"; },"pluralRanges":{"cardinal":{"one_one":"one","one_other":"other","other_one":"other","other_other":"other"},"ordinal":{}}},"locale":"si"}) }