@formatjs/intl-pluralrules 6.1.1 → 6.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (233) hide show
  1. package/abstract/GetOperands.d.ts +56 -29
  2. package/abstract/GetOperands.js +48 -44
  3. package/abstract/InitializePluralRules.d.ts +7 -7
  4. package/abstract/InitializePluralRules.js +30 -16
  5. package/abstract/ResolvePlural.d.ts +41 -11
  6. package/abstract/ResolvePlural.js +73 -20
  7. package/abstract/ResolvePluralRange.d.ts +23 -0
  8. package/abstract/ResolvePluralRange.js +59 -0
  9. package/get_internal_slots.d.ts +2 -1
  10. package/get_internal_slots.js +8 -7
  11. package/index.d.ts +75 -17
  12. package/index.js +217 -137
  13. package/locale-data/af.js +14 -4
  14. package/locale-data/ak.js +14 -4
  15. package/locale-data/am.js +15 -4
  16. package/locale-data/an.js +14 -4
  17. package/locale-data/ar.js +22 -10
  18. package/locale-data/ars.js +21 -9
  19. package/locale-data/as.js +23 -8
  20. package/locale-data/asa.js +13 -3
  21. package/locale-data/ast.js +14 -4
  22. package/locale-data/az.js +21 -8
  23. package/locale-data/bal.js +15 -2
  24. package/locale-data/be.js +20 -8
  25. package/locale-data/bem.js +13 -3
  26. package/locale-data/bez.js +13 -3
  27. package/locale-data/bg.js +14 -4
  28. package/locale-data/bho.js +13 -3
  29. package/locale-data/bm.js +2 -2
  30. package/locale-data/bn.js +23 -8
  31. package/locale-data/bo.js +2 -2
  32. package/locale-data/br.js +19 -8
  33. package/locale-data/brx.js +13 -3
  34. package/locale-data/bs.js +18 -7
  35. package/locale-data/ca.js +25 -10
  36. package/locale-data/ce.js +13 -3
  37. package/locale-data/ceb.js +15 -4
  38. package/locale-data/cgg.js +13 -3
  39. package/locale-data/chr.js +13 -3
  40. package/locale-data/ckb.js +13 -3
  41. package/locale-data/cs.js +19 -8
  42. package/locale-data/cy.js +32 -14
  43. package/locale-data/da.js +17 -5
  44. package/locale-data/de.js +15 -5
  45. package/locale-data/doi.js +14 -3
  46. package/locale-data/dsb.js +19 -7
  47. package/locale-data/dv.js +13 -3
  48. package/locale-data/dz.js +2 -2
  49. package/locale-data/ee.js +13 -3
  50. package/locale-data/el.js +14 -4
  51. package/locale-data/en.js +22 -8
  52. package/locale-data/eo.js +13 -3
  53. package/locale-data/es.js +19 -7
  54. package/locale-data/et.js +15 -5
  55. package/locale-data/eu.js +14 -4
  56. package/locale-data/fa.js +15 -4
  57. package/locale-data/ff.js +13 -3
  58. package/locale-data/fi.js +15 -5
  59. package/locale-data/fil.js +19 -5
  60. package/locale-data/fo.js +13 -3
  61. package/locale-data/fr.js +21 -7
  62. package/locale-data/fur.js +13 -3
  63. package/locale-data/fy.js +14 -4
  64. package/locale-data/ga.js +22 -9
  65. package/locale-data/gd.js +23 -10
  66. package/locale-data/gl.js +15 -5
  67. package/locale-data/gsw.js +14 -4
  68. package/locale-data/gu.js +23 -8
  69. package/locale-data/guw.js +13 -3
  70. package/locale-data/gv.js +20 -8
  71. package/locale-data/ha.js +13 -3
  72. package/locale-data/haw.js +13 -3
  73. package/locale-data/he.js +17 -7
  74. package/locale-data/hi.js +23 -8
  75. package/locale-data/hnj.js +2 -2
  76. package/locale-data/hr.js +18 -7
  77. package/locale-data/hsb.js +19 -7
  78. package/locale-data/hu.js +16 -4
  79. package/locale-data/hy.js +17 -4
  80. package/locale-data/ia.js +15 -5
  81. package/locale-data/id.js +3 -3
  82. package/locale-data/ig.js +2 -2
  83. package/locale-data/ii.js +2 -2
  84. package/locale-data/io.js +15 -5
  85. package/locale-data/is.js +16 -5
  86. package/locale-data/it.js +21 -7
  87. package/locale-data/iu.js +15 -5
  88. package/locale-data/ja.js +3 -3
  89. package/locale-data/jbo.js +2 -2
  90. package/locale-data/jgo.js +13 -3
  91. package/locale-data/jmc.js +13 -3
  92. package/locale-data/jv.js +2 -2
  93. package/locale-data/jw.js +2 -2
  94. package/locale-data/ka.js +19 -7
  95. package/locale-data/kab.js +13 -3
  96. package/locale-data/kaj.js +13 -3
  97. package/locale-data/kcg.js +13 -3
  98. package/locale-data/kde.js +2 -2
  99. package/locale-data/kea.js +2 -2
  100. package/locale-data/kk.js +16 -5
  101. package/locale-data/kkj.js +13 -3
  102. package/locale-data/kl.js +13 -3
  103. package/locale-data/km.js +3 -3
  104. package/locale-data/kn.js +15 -4
  105. package/locale-data/ko.js +3 -3
  106. package/locale-data/ks.js +13 -3
  107. package/locale-data/ksb.js +13 -3
  108. package/locale-data/ksh.js +15 -5
  109. package/locale-data/ku.js +13 -3
  110. package/locale-data/kw.js +25 -11
  111. package/locale-data/ky.js +14 -4
  112. package/locale-data/lag.js +16 -6
  113. package/locale-data/lb.js +13 -3
  114. package/locale-data/lg.js +13 -3
  115. package/locale-data/lij.js +18 -5
  116. package/locale-data/lkt.js +2 -2
  117. package/locale-data/ln.js +13 -3
  118. package/locale-data/lo.js +14 -4
  119. package/locale-data/lt.js +20 -8
  120. package/locale-data/lv.js +18 -7
  121. package/locale-data/mas.js +13 -3
  122. package/locale-data/mg.js +13 -3
  123. package/locale-data/mgo.js +13 -3
  124. package/locale-data/mk.js +22 -8
  125. package/locale-data/ml.js +14 -4
  126. package/locale-data/mn.js +14 -4
  127. package/locale-data/mo.js +19 -6
  128. package/locale-data/mr.js +20 -7
  129. package/locale-data/ms.js +14 -4
  130. package/locale-data/mt.js +19 -8
  131. package/locale-data/my.js +3 -3
  132. package/locale-data/nah.js +13 -3
  133. package/locale-data/naq.js +15 -5
  134. package/locale-data/nb.js +14 -4
  135. package/locale-data/nd.js +13 -3
  136. package/locale-data/ne.js +16 -5
  137. package/locale-data/nl.js +15 -5
  138. package/locale-data/nn.js +13 -3
  139. package/locale-data/nnh.js +13 -3
  140. package/locale-data/no.js +14 -4
  141. package/locale-data/nqo.js +2 -2
  142. package/locale-data/nr.js +13 -3
  143. package/locale-data/nso.js +13 -3
  144. package/locale-data/ny.js +13 -3
  145. package/locale-data/nyn.js +13 -3
  146. package/locale-data/om.js +13 -3
  147. package/locale-data/or.js +22 -9
  148. package/locale-data/os.js +13 -3
  149. package/locale-data/osa.js +2 -2
  150. package/locale-data/pa.js +14 -4
  151. package/locale-data/pap.js +13 -3
  152. package/locale-data/pcm.js +15 -4
  153. package/locale-data/pl.js +19 -8
  154. package/locale-data/prg.js +17 -6
  155. package/locale-data/ps.js +14 -4
  156. package/locale-data/pt-PT.js +17 -6
  157. package/locale-data/pt.js +18 -7
  158. package/locale-data/rm.js +13 -3
  159. package/locale-data/ro.js +20 -7
  160. package/locale-data/rof.js +13 -3
  161. package/locale-data/ru.js +19 -8
  162. package/locale-data/rwk.js +13 -3
  163. package/locale-data/sah.js +2 -2
  164. package/locale-data/saq.js +13 -3
  165. package/locale-data/sat.js +15 -5
  166. package/locale-data/sc.js +18 -5
  167. package/locale-data/scn.js +21 -7
  168. package/locale-data/sd.js +14 -4
  169. package/locale-data/sdh.js +13 -3
  170. package/locale-data/se.js +15 -5
  171. package/locale-data/seh.js +13 -3
  172. package/locale-data/ses.js +2 -2
  173. package/locale-data/sg.js +2 -2
  174. package/locale-data/sh.js +17 -6
  175. package/locale-data/shi.js +16 -6
  176. package/locale-data/si.js +17 -5
  177. package/locale-data/sk.js +19 -8
  178. package/locale-data/sl.js +19 -8
  179. package/locale-data/sma.js +15 -5
  180. package/locale-data/smi.js +15 -5
  181. package/locale-data/smj.js +15 -5
  182. package/locale-data/smn.js +15 -5
  183. package/locale-data/sms.js +15 -5
  184. package/locale-data/sn.js +13 -3
  185. package/locale-data/so.js +13 -3
  186. package/locale-data/sq.js +18 -7
  187. package/locale-data/sr.js +18 -7
  188. package/locale-data/ss.js +13 -3
  189. package/locale-data/ssy.js +13 -3
  190. package/locale-data/st.js +13 -3
  191. package/locale-data/su.js +2 -2
  192. package/locale-data/sv.js +18 -5
  193. package/locale-data/sw.js +15 -5
  194. package/locale-data/syr.js +13 -3
  195. package/locale-data/ta.js +14 -4
  196. package/locale-data/te.js +14 -4
  197. package/locale-data/teo.js +13 -3
  198. package/locale-data/th.js +3 -3
  199. package/locale-data/ti.js +13 -3
  200. package/locale-data/tig.js +13 -3
  201. package/locale-data/tk.js +16 -5
  202. package/locale-data/tl.js +18 -4
  203. package/locale-data/tn.js +13 -3
  204. package/locale-data/to.js +2 -2
  205. package/locale-data/tpi.js +2 -2
  206. package/locale-data/tr.js +14 -4
  207. package/locale-data/ts.js +13 -3
  208. package/locale-data/tzm.js +13 -4
  209. package/locale-data/ug.js +14 -4
  210. package/locale-data/uk.js +22 -8
  211. package/locale-data/und.js +2 -2
  212. package/locale-data/ur.js +15 -5
  213. package/locale-data/uz.js +14 -4
  214. package/locale-data/ve.js +13 -3
  215. package/locale-data/vi.js +14 -4
  216. package/locale-data/vo.js +13 -3
  217. package/locale-data/vun.js +13 -3
  218. package/locale-data/wa.js +13 -3
  219. package/locale-data/wae.js +13 -3
  220. package/locale-data/wo.js +2 -2
  221. package/locale-data/xh.js +13 -3
  222. package/locale-data/xog.js +13 -3
  223. package/locale-data/yi.js +14 -4
  224. package/locale-data/yo.js +2 -2
  225. package/locale-data/yue.js +3 -3
  226. package/locale-data/zh.js +3 -3
  227. package/locale-data/zu.js +15 -4
  228. package/package.json +7 -7
  229. package/polyfill-force.js +6 -6
  230. package/polyfill.iife.js +2599 -3121
  231. package/polyfill.js +8 -8
  232. package/should-polyfill.js +11 -15
  233. package/supported-locales.generated.js +216 -216
@@ -1,8 +1,18 @@
1
1
  /* @generated */
2
2
  // prettier-ignore
3
3
  if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function') {
4
- Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["one","other"],"ordinal":["other"]},"fn":function(n, ord) {
5
- if (ord) return 'other';
6
- return n == 1 ? 'one' : 'other';
7
- }},"locale":"gsw"})
4
+ Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["one","other"],"ordinal":["other"]},"fn":function(num, isOrdinal, exponent = 0) {
5
+ const numStr = String(num);
6
+ const parts = numStr.split(".");
7
+ const integerPart = parts[0];
8
+ const decimalPart = parts[1] || "";
9
+ const n = Math.abs(parseFloat(numStr));
10
+ if (isOrdinal) {
11
+ }
12
+ else {
13
+ if (n === 1)
14
+ return "one";
15
+ }
16
+ return "other";
17
+ },"pluralRanges":{"cardinal":{"one_other":"other","other_one":"one","other_other":"other"},"ordinal":{}}},"locale":"gsw"})
8
18
  }
package/locale-data/gu.js CHANGED
@@ -1,12 +1,27 @@
1
1
  /* @generated */
2
2
  // prettier-ignore
3
3
  if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function') {
4
- Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["one","other"],"ordinal":["one","two","few","many","other"]},"fn":function(n, ord) {
5
- if (ord) return n == 1 ? 'one'
6
- : (n == 2 || n == 3) ? 'two'
7
- : n == 4 ? 'few'
8
- : n == 6 ? 'many'
9
- : 'other';
10
- return n >= 0 && n <= 1 ? 'one' : 'other';
11
- }},"locale":"gu"})
4
+ Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["one","other"],"ordinal":["few","many","one","other","two"]},"fn":function(num, isOrdinal, exponent = 0) {
5
+ const numStr = String(num);
6
+ const parts = numStr.split(".");
7
+ const integerPart = parts[0];
8
+ const decimalPart = parts[1] || "";
9
+ const n = Math.abs(parseFloat(numStr));
10
+ const i = Math.floor(Math.abs(parseFloat(integerPart)));
11
+ if (isOrdinal) {
12
+ if (n === 4)
13
+ return "few";
14
+ if (n === 6)
15
+ return "many";
16
+ if (n === 1)
17
+ return "one";
18
+ if ((n === 2 || n === 3))
19
+ return "two";
20
+ }
21
+ else {
22
+ if (i === 0 || n === 1)
23
+ return "one";
24
+ }
25
+ return "other";
26
+ },"pluralRanges":{"cardinal":{"one_one":"one","one_other":"other","other_other":"other"},"ordinal":{}}},"locale":"gu"})
12
27
  }
@@ -1,8 +1,18 @@
1
1
  /* @generated */
2
2
  // prettier-ignore
3
3
  if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function') {
4
- Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["one","other"],"ordinal":["other"]},"fn":function(n, ord) {
5
- if (ord) return 'other';
6
- return (n == 0 || n == 1) ? 'one' : 'other';
4
+ Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["one","other"],"ordinal":["other"]},"fn":function(num, isOrdinal, exponent = 0) {
5
+ const numStr = String(num);
6
+ const parts = numStr.split(".");
7
+ const integerPart = parts[0];
8
+ const decimalPart = parts[1] || "";
9
+ const n = Math.abs(parseFloat(numStr));
10
+ if (isOrdinal) {
11
+ }
12
+ else {
13
+ if ((n >= 0 && n <= 1))
14
+ return "one";
15
+ }
16
+ return "other";
7
17
  }},"locale":"guw"})
8
18
  }
package/locale-data/gv.js CHANGED
@@ -1,13 +1,25 @@
1
1
  /* @generated */
2
2
  // prettier-ignore
3
3
  if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function') {
4
- Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["one","two","few","many","other"],"ordinal":["other"]},"fn":function(n, ord) {
5
- var s = String(n).split('.'), i = s[0], v0 = !s[1], i10 = i.slice(-1), i100 = i.slice(-2);
6
- if (ord) return 'other';
7
- return v0 && i10 == 1 ? 'one'
8
- : v0 && i10 == 2 ? 'two'
9
- : v0 && (i100 == 0 || i100 == 20 || i100 == 40 || i100 == 60 || i100 == 80) ? 'few'
10
- : !v0 ? 'many'
11
- : 'other';
4
+ Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["few","many","one","other","two"],"ordinal":["other"]},"fn":function(num, isOrdinal, exponent = 0) {
5
+ const numStr = String(num);
6
+ const parts = numStr.split(".");
7
+ const integerPart = parts[0];
8
+ const decimalPart = parts[1] || "";
9
+ const i = Math.floor(Math.abs(parseFloat(integerPart)));
10
+ const v = decimalPart.length;
11
+ if (isOrdinal) {
12
+ }
13
+ else {
14
+ if (v === 0 && (((((i % 100) === 0 || (i % 100) === 20) || (i % 100) === 40) || (i % 100) === 60) || (i % 100) === 80))
15
+ return "few";
16
+ if (v !== 0)
17
+ return "many";
18
+ if (v === 0 && (i % 10) === 1)
19
+ return "one";
20
+ if (v === 0 && (i % 10) === 2)
21
+ return "two";
22
+ }
23
+ return "other";
12
24
  }},"locale":"gv"})
13
25
  }
package/locale-data/ha.js CHANGED
@@ -1,8 +1,18 @@
1
1
  /* @generated */
2
2
  // prettier-ignore
3
3
  if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function') {
4
- Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["one","other"],"ordinal":["other"]},"fn":function(n, ord) {
5
- if (ord) return 'other';
6
- return n == 1 ? 'one' : 'other';
4
+ Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["one","other"],"ordinal":["other"]},"fn":function(num, isOrdinal, exponent = 0) {
5
+ const numStr = String(num);
6
+ const parts = numStr.split(".");
7
+ const integerPart = parts[0];
8
+ const decimalPart = parts[1] || "";
9
+ const n = Math.abs(parseFloat(numStr));
10
+ if (isOrdinal) {
11
+ }
12
+ else {
13
+ if (n === 1)
14
+ return "one";
15
+ }
16
+ return "other";
7
17
  }},"locale":"ha"})
8
18
  }
@@ -1,8 +1,18 @@
1
1
  /* @generated */
2
2
  // prettier-ignore
3
3
  if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function') {
4
- Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["one","other"],"ordinal":["other"]},"fn":function(n, ord) {
5
- if (ord) return 'other';
6
- return n == 1 ? 'one' : 'other';
4
+ Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["one","other"],"ordinal":["other"]},"fn":function(num, isOrdinal, exponent = 0) {
5
+ const numStr = String(num);
6
+ const parts = numStr.split(".");
7
+ const integerPart = parts[0];
8
+ const decimalPart = parts[1] || "";
9
+ const n = Math.abs(parseFloat(numStr));
10
+ if (isOrdinal) {
11
+ }
12
+ else {
13
+ if (n === 1)
14
+ return "one";
15
+ }
16
+ return "other";
7
17
  }},"locale":"haw"})
8
18
  }
package/locale-data/he.js CHANGED
@@ -1,11 +1,21 @@
1
1
  /* @generated */
2
2
  // prettier-ignore
3
3
  if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function') {
4
- Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["one","two","other"],"ordinal":["other"]},"fn":function(n, ord) {
5
- var s = String(n).split('.'), i = s[0], v0 = !s[1];
6
- if (ord) return 'other';
7
- return i == 1 && v0 || i == 0 && !v0 ? 'one'
8
- : i == 2 && v0 ? 'two'
9
- : 'other';
10
- }},"locale":"he"})
4
+ Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["one","other","two"],"ordinal":["other"]},"fn":function(num, isOrdinal, exponent = 0) {
5
+ const numStr = String(num);
6
+ const parts = numStr.split(".");
7
+ const integerPart = parts[0];
8
+ const decimalPart = parts[1] || "";
9
+ const i = Math.floor(Math.abs(parseFloat(integerPart)));
10
+ const v = decimalPart.length;
11
+ if (isOrdinal) {
12
+ }
13
+ else {
14
+ if (i === 1 && v === 0 || i === 0 && v !== 0)
15
+ return "one";
16
+ if (i === 2 && v === 0)
17
+ return "two";
18
+ }
19
+ return "other";
20
+ },"pluralRanges":{"cardinal":{"one_other":"other","one_two":"other","other_one":"other","other_other":"other","other_two":"other","two_other":"other"},"ordinal":{}}},"locale":"he"})
11
21
  }
package/locale-data/hi.js CHANGED
@@ -1,12 +1,27 @@
1
1
  /* @generated */
2
2
  // prettier-ignore
3
3
  if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function') {
4
- Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["one","other"],"ordinal":["one","two","few","many","other"]},"fn":function(n, ord) {
5
- if (ord) return n == 1 ? 'one'
6
- : (n == 2 || n == 3) ? 'two'
7
- : n == 4 ? 'few'
8
- : n == 6 ? 'many'
9
- : 'other';
10
- return n >= 0 && n <= 1 ? 'one' : 'other';
11
- }},"locale":"hi"})
4
+ Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["one","other"],"ordinal":["few","many","one","other","two"]},"fn":function(num, isOrdinal, exponent = 0) {
5
+ const numStr = String(num);
6
+ const parts = numStr.split(".");
7
+ const integerPart = parts[0];
8
+ const decimalPart = parts[1] || "";
9
+ const n = Math.abs(parseFloat(numStr));
10
+ const i = Math.floor(Math.abs(parseFloat(integerPart)));
11
+ if (isOrdinal) {
12
+ if (n === 4)
13
+ return "few";
14
+ if (n === 6)
15
+ return "many";
16
+ if (n === 1)
17
+ return "one";
18
+ if ((n === 2 || n === 3))
19
+ return "two";
20
+ }
21
+ else {
22
+ if (i === 0 || n === 1)
23
+ return "one";
24
+ }
25
+ return "other";
26
+ },"pluralRanges":{"cardinal":{"one_one":"one","one_other":"other","other_other":"other"},"ordinal":{}}},"locale":"hi"})
12
27
  }
@@ -1,7 +1,7 @@
1
1
  /* @generated */
2
2
  // prettier-ignore
3
3
  if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function') {
4
- Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["other"],"ordinal":["other"]},"fn":function(n, ord) {
5
- return 'other';
4
+ Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["other"],"ordinal":["other"]},"fn":function(num, isOrdinal, exponent = 0) {
5
+ return "other";
6
6
  }},"locale":"hnj"})
7
7
  }
package/locale-data/hr.js CHANGED
@@ -1,11 +1,22 @@
1
1
  /* @generated */
2
2
  // prettier-ignore
3
3
  if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function') {
4
- Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["one","few","other"],"ordinal":["other"]},"fn":function(n, ord) {
5
- var s = String(n).split('.'), i = s[0], f = s[1] || '', v0 = !s[1], i10 = i.slice(-1), i100 = i.slice(-2), f10 = f.slice(-1), f100 = f.slice(-2);
6
- if (ord) return 'other';
7
- return v0 && i10 == 1 && i100 != 11 || f10 == 1 && f100 != 11 ? 'one'
8
- : v0 && (i10 >= 2 && i10 <= 4) && (i100 < 12 || i100 > 14) || (f10 >= 2 && f10 <= 4) && (f100 < 12 || f100 > 14) ? 'few'
9
- : 'other';
10
- }},"locale":"hr"})
4
+ Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["few","one","other"],"ordinal":["other"]},"fn":function(num, isOrdinal, exponent = 0) {
5
+ const numStr = String(num);
6
+ const parts = numStr.split(".");
7
+ const integerPart = parts[0];
8
+ const decimalPart = parts[1] || "";
9
+ const i = Math.floor(Math.abs(parseFloat(integerPart)));
10
+ const v = decimalPart.length;
11
+ const f = v > 0 ? parseInt(decimalPart, 10) : 0;
12
+ if (isOrdinal) {
13
+ }
14
+ else {
15
+ if (v === 0 && ((i % 10) >= 2 && (i % 10) <= 4) && ((i % 100) < 12 || (i % 100) > 14) || ((f % 10) >= 2 && (f % 10) <= 4) && ((f % 100) < 12 || (f % 100) > 14))
16
+ return "few";
17
+ if (v === 0 && (i % 10) === 1 && (i % 100) !== 11 || (f % 10) === 1 && (f % 100) !== 11)
18
+ return "one";
19
+ }
20
+ return "other";
21
+ },"pluralRanges":{"cardinal":{"few_few":"few","few_one":"one","few_other":"other","one_few":"few","one_one":"one","one_other":"other","other_few":"few","other_one":"one","other_other":"other"},"ordinal":{}}},"locale":"hr"})
11
22
  }
@@ -1,12 +1,24 @@
1
1
  /* @generated */
2
2
  // prettier-ignore
3
3
  if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function') {
4
- Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["one","two","few","other"],"ordinal":["other"]},"fn":function(n, ord) {
5
- var s = String(n).split('.'), i = s[0], f = s[1] || '', v0 = !s[1], i100 = i.slice(-2), f100 = f.slice(-2);
6
- if (ord) return 'other';
7
- return v0 && i100 == 1 || f100 == 1 ? 'one'
8
- : v0 && i100 == 2 || f100 == 2 ? 'two'
9
- : v0 && (i100 == 3 || i100 == 4) || (f100 == 3 || f100 == 4) ? 'few'
10
- : 'other';
4
+ Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["few","one","other","two"],"ordinal":["other"]},"fn":function(num, isOrdinal, exponent = 0) {
5
+ const numStr = String(num);
6
+ const parts = numStr.split(".");
7
+ const integerPart = parts[0];
8
+ const decimalPart = parts[1] || "";
9
+ const i = Math.floor(Math.abs(parseFloat(integerPart)));
10
+ const v = decimalPart.length;
11
+ const f = v > 0 ? parseInt(decimalPart, 10) : 0;
12
+ if (isOrdinal) {
13
+ }
14
+ else {
15
+ if (v === 0 && ((i % 100) >= 3 && (i % 100) <= 4) || ((f % 100) >= 3 && (f % 100) <= 4))
16
+ return "few";
17
+ if (v === 0 && (i % 100) === 1 || (f % 100) === 1)
18
+ return "one";
19
+ if (v === 0 && (i % 100) === 2 || (f % 100) === 2)
20
+ return "two";
21
+ }
22
+ return "other";
11
23
  }},"locale":"hsb"})
12
24
  }
package/locale-data/hu.js CHANGED
@@ -1,8 +1,20 @@
1
1
  /* @generated */
2
2
  // prettier-ignore
3
3
  if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function') {
4
- Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["one","other"],"ordinal":["one","other"]},"fn":function(n, ord) {
5
- if (ord) return (n == 1 || n == 5) ? 'one' : 'other';
6
- return n == 1 ? 'one' : 'other';
7
- }},"locale":"hu"})
4
+ Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["one","other"],"ordinal":["one","other"]},"fn":function(num, isOrdinal, exponent = 0) {
5
+ const numStr = String(num);
6
+ const parts = numStr.split(".");
7
+ const integerPart = parts[0];
8
+ const decimalPart = parts[1] || "";
9
+ const n = Math.abs(parseFloat(numStr));
10
+ if (isOrdinal) {
11
+ if ((n === 1 || n === 5))
12
+ return "one";
13
+ }
14
+ else {
15
+ if (n === 1)
16
+ return "one";
17
+ }
18
+ return "other";
19
+ },"pluralRanges":{"cardinal":{"one_other":"other","other_one":"one","other_other":"other"},"ordinal":{}}},"locale":"hu"})
8
20
  }
package/locale-data/hy.js CHANGED
@@ -1,8 +1,21 @@
1
1
  /* @generated */
2
2
  // prettier-ignore
3
3
  if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function') {
4
- Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["one","other"],"ordinal":["one","other"]},"fn":function(n, ord) {
5
- if (ord) return n == 1 ? 'one' : 'other';
6
- return n >= 0 && n < 2 ? 'one' : 'other';
7
- }},"locale":"hy"})
4
+ Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["one","other"],"ordinal":["one","other"]},"fn":function(num, isOrdinal, exponent = 0) {
5
+ const numStr = String(num);
6
+ const parts = numStr.split(".");
7
+ const integerPart = parts[0];
8
+ const decimalPart = parts[1] || "";
9
+ const n = Math.abs(parseFloat(numStr));
10
+ const i = Math.floor(Math.abs(parseFloat(integerPart)));
11
+ if (isOrdinal) {
12
+ if (n === 1)
13
+ return "one";
14
+ }
15
+ else {
16
+ if ((i === 0 || i === 1))
17
+ return "one";
18
+ }
19
+ return "other";
20
+ },"pluralRanges":{"cardinal":{"one_one":"one","one_other":"other","other_other":"other"},"ordinal":{}}},"locale":"hy"})
8
21
  }
package/locale-data/ia.js CHANGED
@@ -1,9 +1,19 @@
1
1
  /* @generated */
2
2
  // prettier-ignore
3
3
  if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function') {
4
- Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["one","other"],"ordinal":["other"]},"fn":function(n, ord) {
5
- var s = String(n).split('.'), v0 = !s[1];
6
- if (ord) return 'other';
7
- return n == 1 && v0 ? 'one' : 'other';
8
- }},"locale":"ia"})
4
+ Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["one","other"],"ordinal":["other"]},"fn":function(num, isOrdinal, exponent = 0) {
5
+ const numStr = String(num);
6
+ const parts = numStr.split(".");
7
+ const integerPart = parts[0];
8
+ const decimalPart = parts[1] || "";
9
+ const i = Math.floor(Math.abs(parseFloat(integerPart)));
10
+ const v = decimalPart.length;
11
+ if (isOrdinal) {
12
+ }
13
+ else {
14
+ if (i === 1 && v === 0)
15
+ return "one";
16
+ }
17
+ return "other";
18
+ },"pluralRanges":{"cardinal":{"one_other":"other","other_one":"other","other_other":"other"},"ordinal":{}}},"locale":"ia"})
9
19
  }
package/locale-data/id.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /* @generated */
2
2
  // prettier-ignore
3
3
  if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function') {
4
- Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["other"],"ordinal":["other"]},"fn":function(n, ord) {
5
- return 'other';
6
- }},"locale":"id"})
4
+ Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["other"],"ordinal":["other"]},"fn":function(num, isOrdinal, exponent = 0) {
5
+ return "other";
6
+ },"pluralRanges":{"cardinal":{"other_other":"other"},"ordinal":{}}},"locale":"id"})
7
7
  }
package/locale-data/ig.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /* @generated */
2
2
  // prettier-ignore
3
3
  if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function') {
4
- Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["other"],"ordinal":["other"]},"fn":function(n, ord) {
5
- return 'other';
4
+ Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["other"],"ordinal":["other"]},"fn":function(num, isOrdinal, exponent = 0) {
5
+ return "other";
6
6
  }},"locale":"ig"})
7
7
  }
package/locale-data/ii.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /* @generated */
2
2
  // prettier-ignore
3
3
  if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function') {
4
- Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["other"],"ordinal":["other"]},"fn":function(n, ord) {
5
- return 'other';
4
+ Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["other"],"ordinal":["other"]},"fn":function(num, isOrdinal, exponent = 0) {
5
+ return "other";
6
6
  }},"locale":"ii"})
7
7
  }
package/locale-data/io.js CHANGED
@@ -1,9 +1,19 @@
1
1
  /* @generated */
2
2
  // prettier-ignore
3
3
  if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function') {
4
- Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["one","other"],"ordinal":["other"]},"fn":function(n, ord) {
5
- var s = String(n).split('.'), v0 = !s[1];
6
- if (ord) return 'other';
7
- return n == 1 && v0 ? 'one' : 'other';
8
- }},"locale":"io"})
4
+ Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["one","other"],"ordinal":["other"]},"fn":function(num, isOrdinal, exponent = 0) {
5
+ const numStr = String(num);
6
+ const parts = numStr.split(".");
7
+ const integerPart = parts[0];
8
+ const decimalPart = parts[1] || "";
9
+ const i = Math.floor(Math.abs(parseFloat(integerPart)));
10
+ const v = decimalPart.length;
11
+ if (isOrdinal) {
12
+ }
13
+ else {
14
+ if (i === 1 && v === 0)
15
+ return "one";
16
+ }
17
+ return "other";
18
+ },"pluralRanges":{"cardinal":{"one_other":"other","other_one":"other","other_other":"other"},"ordinal":{}}},"locale":"io"})
9
19
  }
package/locale-data/is.js CHANGED
@@ -1,9 +1,20 @@
1
1
  /* @generated */
2
2
  // prettier-ignore
3
3
  if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function') {
4
- Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["one","other"],"ordinal":["other"]},"fn":function(n, ord) {
5
- var s = String(n).split('.'), i = s[0], t = (s[1] || '').replace(/0+$/, ''), t0 = Number(s[0]) == n, i10 = i.slice(-1), i100 = i.slice(-2);
6
- if (ord) return 'other';
7
- return t0 && i10 == 1 && i100 != 11 || t % 10 == 1 && t % 100 != 11 ? 'one' : 'other';
8
- }},"locale":"is"})
4
+ Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["one","other"],"ordinal":["other"]},"fn":function(num, isOrdinal, exponent = 0) {
5
+ const numStr = String(num);
6
+ const parts = numStr.split(".");
7
+ const integerPart = parts[0];
8
+ const decimalPart = parts[1] || "";
9
+ const i = Math.floor(Math.abs(parseFloat(integerPart)));
10
+ const w = decimalPart.replace(/0+$/, "").length;
11
+ const t = w > 0 ? parseInt(decimalPart.replace(/0+$/, ""), 10) : 0;
12
+ if (isOrdinal) {
13
+ }
14
+ else {
15
+ if (t === 0 && (i % 10) === 1 && (i % 100) !== 11 || (t % 10) === 1 && (t % 100) !== 11)
16
+ return "one";
17
+ }
18
+ return "other";
19
+ },"pluralRanges":{"cardinal":{"one_one":"one","one_other":"other","other_one":"one","other_other":"other"},"ordinal":{}}},"locale":"is"})
9
20
  }
package/locale-data/it.js CHANGED
@@ -1,11 +1,25 @@
1
1
  /* @generated */
2
2
  // prettier-ignore
3
3
  if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function') {
4
- Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["one","many","other"],"ordinal":["many","other"]},"fn":function(n, ord) {
5
- var _n = String(n), se = _n.split(/[ce]/), e = se[1] || 0, c = e, s = String(e ? Number(se[0]) * Math.pow(10, e) : _n).split("."), i = s[0], v0 = !s[1], i1000000 = i.slice(-6);
6
- if (ord) return (n == 11 || n == 8 || n == 80 || n == 800) ? 'many' : 'other';
7
- return n == 1 && v0 ? 'one'
8
- : e == 0 && i != 0 && i1000000 == 0 && v0 || (e < 0 || e > 5) ? 'many'
9
- : 'other';
10
- }},"locale":"it"})
4
+ Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["many","one","other"],"ordinal":["many","other"]},"fn":function(num, isOrdinal, exponent = 0) {
5
+ const numStr = String(num);
6
+ const parts = numStr.split(".");
7
+ const integerPart = parts[0];
8
+ const decimalPart = parts[1] || "";
9
+ const n = Math.abs(parseFloat(numStr));
10
+ const i = Math.floor(Math.abs(parseFloat(integerPart)));
11
+ const v = decimalPart.length;
12
+ const e = exponent;
13
+ if (isOrdinal) {
14
+ if ((((n === 11 || n === 8) || n === 80) || n === 800))
15
+ return "many";
16
+ }
17
+ else {
18
+ if (e === 0 && i !== 0 && (i % 1000000) === 0 && v === 0 || (e < 0 || e > 5))
19
+ return "many";
20
+ if (i === 1 && v === 0)
21
+ return "one";
22
+ }
23
+ return "other";
24
+ },"pluralRanges":{"cardinal":{"one_other":"other","other_one":"one","other_other":"other"},"ordinal":{}}},"locale":"it"})
11
25
  }
package/locale-data/iu.js CHANGED
@@ -1,10 +1,20 @@
1
1
  /* @generated */
2
2
  // prettier-ignore
3
3
  if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function') {
4
- Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["one","two","other"],"ordinal":["other"]},"fn":function(n, ord) {
5
- if (ord) return 'other';
6
- return n == 1 ? 'one'
7
- : n == 2 ? 'two'
8
- : 'other';
4
+ Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["one","other","two"],"ordinal":["other"]},"fn":function(num, isOrdinal, exponent = 0) {
5
+ const numStr = String(num);
6
+ const parts = numStr.split(".");
7
+ const integerPart = parts[0];
8
+ const decimalPart = parts[1] || "";
9
+ const n = Math.abs(parseFloat(numStr));
10
+ if (isOrdinal) {
11
+ }
12
+ else {
13
+ if (n === 1)
14
+ return "one";
15
+ if (n === 2)
16
+ return "two";
17
+ }
18
+ return "other";
9
19
  }},"locale":"iu"})
10
20
  }
package/locale-data/ja.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /* @generated */
2
2
  // prettier-ignore
3
3
  if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function') {
4
- Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["other"],"ordinal":["other"]},"fn":function(n, ord) {
5
- return 'other';
6
- }},"locale":"ja"})
4
+ Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["other"],"ordinal":["other"]},"fn":function(num, isOrdinal, exponent = 0) {
5
+ return "other";
6
+ },"pluralRanges":{"cardinal":{"other_other":"other"},"ordinal":{}}},"locale":"ja"})
7
7
  }
@@ -1,7 +1,7 @@
1
1
  /* @generated */
2
2
  // prettier-ignore
3
3
  if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function') {
4
- Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["other"],"ordinal":["other"]},"fn":function(n, ord) {
5
- return 'other';
4
+ Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["other"],"ordinal":["other"]},"fn":function(num, isOrdinal, exponent = 0) {
5
+ return "other";
6
6
  }},"locale":"jbo"})
7
7
  }
@@ -1,8 +1,18 @@
1
1
  /* @generated */
2
2
  // prettier-ignore
3
3
  if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function') {
4
- Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["one","other"],"ordinal":["other"]},"fn":function(n, ord) {
5
- if (ord) return 'other';
6
- return n == 1 ? 'one' : 'other';
4
+ Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["one","other"],"ordinal":["other"]},"fn":function(num, isOrdinal, exponent = 0) {
5
+ const numStr = String(num);
6
+ const parts = numStr.split(".");
7
+ const integerPart = parts[0];
8
+ const decimalPart = parts[1] || "";
9
+ const n = Math.abs(parseFloat(numStr));
10
+ if (isOrdinal) {
11
+ }
12
+ else {
13
+ if (n === 1)
14
+ return "one";
15
+ }
16
+ return "other";
7
17
  }},"locale":"jgo"})
8
18
  }
@@ -1,8 +1,18 @@
1
1
  /* @generated */
2
2
  // prettier-ignore
3
3
  if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function') {
4
- Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["one","other"],"ordinal":["other"]},"fn":function(n, ord) {
5
- if (ord) return 'other';
6
- return n == 1 ? 'one' : 'other';
4
+ Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["one","other"],"ordinal":["other"]},"fn":function(num, isOrdinal, exponent = 0) {
5
+ const numStr = String(num);
6
+ const parts = numStr.split(".");
7
+ const integerPart = parts[0];
8
+ const decimalPart = parts[1] || "";
9
+ const n = Math.abs(parseFloat(numStr));
10
+ if (isOrdinal) {
11
+ }
12
+ else {
13
+ if (n === 1)
14
+ return "one";
15
+ }
16
+ return "other";
7
17
  }},"locale":"jmc"})
8
18
  }
package/locale-data/jv.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /* @generated */
2
2
  // prettier-ignore
3
3
  if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function') {
4
- Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["other"],"ordinal":["other"]},"fn":function(n, ord) {
5
- return 'other';
4
+ Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["other"],"ordinal":["other"]},"fn":function(num, isOrdinal, exponent = 0) {
5
+ return "other";
6
6
  }},"locale":"jv"})
7
7
  }