make-plural 7.0.0 → 7.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.
- package/cardinals.d.ts +12 -11
- package/cardinals.js +50 -27
- package/cardinals.mjs +44 -22
- package/examples.d.ts +16 -15
- package/examples.js +47 -46
- package/examples.mjs +47 -46
- package/ordinals.d.ts +5 -3
- package/ordinals.js +10 -6
- package/ordinals.mjs +5 -3
- package/package.json +1 -1
- package/pluralCategories.d.ts +12 -11
- package/pluralCategories.js +63 -63
- package/pluralCategories.mjs +63 -63
- package/plurals.d.ts +11 -10
- package/plurals.js +50 -31
- package/plurals.mjs +44 -26
- package/ranges.d.ts +1 -1
- package/ranges.js +1 -7
- package/ranges.mjs +1 -7
package/plurals.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export const as: (n: number | string, ord?: boolean) => "one" | "two" | "few" |
|
|
|
10
10
|
export const asa: (n: number | string, ord?: boolean) => "one" | "other";
|
|
11
11
|
export const ast: (n: number | string, ord?: boolean) => "one" | "other";
|
|
12
12
|
export const az: (n: number | string, ord?: boolean) => "one" | "few" | "many" | "other";
|
|
13
|
+
export const bal: (n: number | string, ord?: boolean) => "one" | "other";
|
|
13
14
|
export const be: (n: number | string, ord?: boolean) => "one" | "few" | "many" | "other";
|
|
14
15
|
export const bem: (n: number | string, ord?: boolean) => "one" | "other";
|
|
15
16
|
export const bez: (n: number | string, ord?: boolean) => "one" | "other";
|
|
@@ -21,7 +22,7 @@ export const bo: (n: number | string, ord?: boolean) => "other";
|
|
|
21
22
|
export const br: (n: number | string, ord?: boolean) => "one" | "two" | "few" | "many" | "other";
|
|
22
23
|
export const brx: (n: number | string, ord?: boolean) => "one" | "other";
|
|
23
24
|
export const bs: (n: number | string, ord?: boolean) => "one" | "few" | "other";
|
|
24
|
-
export const ca: (n: number | string, ord?: boolean) => "one" | "two" | "few" | "other";
|
|
25
|
+
export const ca: (n: number | string, ord?: boolean) => "one" | "two" | "few" | "many" | "other";
|
|
25
26
|
export const ce: (n: number | string, ord?: boolean) => "one" | "other";
|
|
26
27
|
export const ceb: (n: number | string, ord?: boolean) => "one" | "other";
|
|
27
28
|
export const cgg: (n: number | string, ord?: boolean) => "one" | "other";
|
|
@@ -39,7 +40,7 @@ export const ee: (n: number | string, ord?: boolean) => "one" | "other";
|
|
|
39
40
|
export const el: (n: number | string, ord?: boolean) => "one" | "other";
|
|
40
41
|
export const en: (n: number | string, ord?: boolean) => "one" | "two" | "few" | "other";
|
|
41
42
|
export const eo: (n: number | string, ord?: boolean) => "one" | "other";
|
|
42
|
-
export const es: (n: number | string, ord?: boolean) => "one" | "other";
|
|
43
|
+
export const es: (n: number | string, ord?: boolean) => "one" | "many" | "other";
|
|
43
44
|
export const et: (n: number | string, ord?: boolean) => "one" | "other";
|
|
44
45
|
export const eu: (n: number | string, ord?: boolean) => "one" | "other";
|
|
45
46
|
export const fa: (n: number | string, ord?: boolean) => "one" | "other";
|
|
@@ -59,8 +60,9 @@ export const guw: (n: number | string, ord?: boolean) => "one" | "other";
|
|
|
59
60
|
export const gv: (n: number | string, ord?: boolean) => "one" | "two" | "few" | "many" | "other";
|
|
60
61
|
export const ha: (n: number | string, ord?: boolean) => "one" | "other";
|
|
61
62
|
export const haw: (n: number | string, ord?: boolean) => "one" | "other";
|
|
62
|
-
export const he: (n: number | string, ord?: boolean) => "one" | "two" | "
|
|
63
|
+
export const he: (n: number | string, ord?: boolean) => "one" | "two" | "other";
|
|
63
64
|
export const hi: (n: number | string, ord?: boolean) => "one" | "two" | "few" | "many" | "other";
|
|
65
|
+
export const hnj: (n: number | string, ord?: boolean) => "other";
|
|
64
66
|
export const hr: (n: number | string, ord?: boolean) => "one" | "few" | "other";
|
|
65
67
|
export const hsb: (n: number | string, ord?: boolean) => "one" | "two" | "few" | "other";
|
|
66
68
|
export const hu: (n: number | string, ord?: boolean) => "one" | "other";
|
|
@@ -69,16 +71,13 @@ export const ia: (n: number | string, ord?: boolean) => "one" | "other";
|
|
|
69
71
|
export const id: (n: number | string, ord?: boolean) => "other";
|
|
70
72
|
export const ig: (n: number | string, ord?: boolean) => "other";
|
|
71
73
|
export const ii: (n: number | string, ord?: boolean) => "other";
|
|
72
|
-
export const _in: (n: number | string, ord?: boolean) => "other";
|
|
73
74
|
export const io: (n: number | string, ord?: boolean) => "one" | "other";
|
|
74
75
|
export const is: (n: number | string, ord?: boolean) => "one" | "other";
|
|
75
76
|
export const it: (n: number | string, ord?: boolean) => "one" | "many" | "other";
|
|
76
77
|
export const iu: (n: number | string, ord?: boolean) => "one" | "two" | "other";
|
|
77
|
-
export const iw: (n: number | string, ord?: boolean) => "one" | "two" | "many" | "other";
|
|
78
78
|
export const ja: (n: number | string, ord?: boolean) => "other";
|
|
79
79
|
export const jbo: (n: number | string, ord?: boolean) => "other";
|
|
80
80
|
export const jgo: (n: number | string, ord?: boolean) => "one" | "other";
|
|
81
|
-
export const ji: (n: number | string, ord?: boolean) => "one" | "other";
|
|
82
81
|
export const jmc: (n: number | string, ord?: boolean) => "one" | "other";
|
|
83
82
|
export const jv: (n: number | string, ord?: boolean) => "other";
|
|
84
83
|
export const jw: (n: number | string, ord?: boolean) => "other";
|
|
@@ -118,7 +117,7 @@ export const mn: (n: number | string, ord?: boolean) => "one" | "other";
|
|
|
118
117
|
export const mo: (n: number | string, ord?: boolean) => "one" | "few" | "other";
|
|
119
118
|
export const mr: (n: number | string, ord?: boolean) => "one" | "two" | "few" | "other";
|
|
120
119
|
export const ms: (n: number | string, ord?: boolean) => "one" | "other";
|
|
121
|
-
export const mt: (n: number | string, ord?: boolean) => "one" | "few" | "many" | "other";
|
|
120
|
+
export const mt: (n: number | string, ord?: boolean) => "one" | "two" | "few" | "many" | "other";
|
|
122
121
|
export const my: (n: number | string, ord?: boolean) => "other";
|
|
123
122
|
export const nah: (n: number | string, ord?: boolean) => "one" | "other";
|
|
124
123
|
export const naq: (n: number | string, ord?: boolean) => "one" | "two" | "other";
|
|
@@ -144,12 +143,11 @@ export const pcm: (n: number | string, ord?: boolean) => "one" | "other";
|
|
|
144
143
|
export const pl: (n: number | string, ord?: boolean) => "one" | "few" | "many" | "other";
|
|
145
144
|
export const prg: (n: number | string, ord?: boolean) => "zero" | "one" | "other";
|
|
146
145
|
export const ps: (n: number | string, ord?: boolean) => "one" | "other";
|
|
147
|
-
export const pt: (n: number | string, ord?: boolean) => "one" | "other";
|
|
148
|
-
export const pt_PT: (n: number | string, ord?: boolean) => "one" | "other";
|
|
146
|
+
export const pt: (n: number | string, ord?: boolean) => "one" | "many" | "other";
|
|
147
|
+
export const pt_PT: (n: number | string, ord?: boolean) => "one" | "many" | "other";
|
|
149
148
|
export const rm: (n: number | string, ord?: boolean) => "one" | "other";
|
|
150
149
|
export const ro: (n: number | string, ord?: boolean) => "one" | "few" | "other";
|
|
151
150
|
export const rof: (n: number | string, ord?: boolean) => "one" | "other";
|
|
152
|
-
export const root: (n: number | string, ord?: boolean) => "other";
|
|
153
151
|
export const ru: (n: number | string, ord?: boolean) => "one" | "few" | "many" | "other";
|
|
154
152
|
export const rwk: (n: number | string, ord?: boolean) => "one" | "other";
|
|
155
153
|
export const sah: (n: number | string, ord?: boolean) => "other";
|
|
@@ -194,14 +192,17 @@ export const tk: (n: number | string, ord?: boolean) => "one" | "few" | "other";
|
|
|
194
192
|
export const tl: (n: number | string, ord?: boolean) => "one" | "other";
|
|
195
193
|
export const tn: (n: number | string, ord?: boolean) => "one" | "other";
|
|
196
194
|
export const to: (n: number | string, ord?: boolean) => "other";
|
|
195
|
+
export const tpi: (n: number | string, ord?: boolean) => "other";
|
|
197
196
|
export const tr: (n: number | string, ord?: boolean) => "one" | "other";
|
|
198
197
|
export const ts: (n: number | string, ord?: boolean) => "one" | "other";
|
|
199
198
|
export const tzm: (n: number | string, ord?: boolean) => "one" | "other";
|
|
200
199
|
export const ug: (n: number | string, ord?: boolean) => "one" | "other";
|
|
201
200
|
export const uk: (n: number | string, ord?: boolean) => "one" | "few" | "many" | "other";
|
|
201
|
+
export const und: (n: number | string, ord?: boolean) => "other";
|
|
202
202
|
export const ur: (n: number | string, ord?: boolean) => "one" | "other";
|
|
203
203
|
export const uz: (n: number | string, ord?: boolean) => "one" | "other";
|
|
204
204
|
export const ve: (n: number | string, ord?: boolean) => "one" | "other";
|
|
205
|
+
export const vec: (n: number | string, ord?: boolean) => "one" | "many" | "other";
|
|
205
206
|
export const vi: (n: number | string, ord?: boolean) => "one" | "other";
|
|
206
207
|
export const vo: (n: number | string, ord?: boolean) => "one" | "other";
|
|
207
208
|
export const vun: (n: number | string, ord?: boolean) => "one" | "other";
|
package/plurals.js
CHANGED
|
@@ -29,8 +29,6 @@ const f = (n, ord) => {
|
|
|
29
29
|
else if (typeof exports === 'object') module.exports = plurals;
|
|
30
30
|
else root.plurals = plurals;
|
|
31
31
|
}(this, {
|
|
32
|
-
_in: e,
|
|
33
|
-
|
|
34
32
|
af: a,
|
|
35
33
|
|
|
36
34
|
ak: b,
|
|
@@ -83,6 +81,8 @@ az: (n, ord) => {
|
|
|
83
81
|
return n == 1 ? 'one' : 'other';
|
|
84
82
|
},
|
|
85
83
|
|
|
84
|
+
bal: (n, ord) => n == 1 ? 'one' : 'other',
|
|
85
|
+
|
|
86
86
|
be: (n, ord) => {
|
|
87
87
|
const s = String(n).split('.'), t0 = Number(s[0]) == n, n10 = t0 && s[0].slice(-1), n100 = t0 && s[0].slice(-2);
|
|
88
88
|
if (ord) return (n10 == 2 || n10 == 3) && n100 != 12 && n100 != 13 ? 'few' : 'other';
|
|
@@ -134,12 +134,14 @@ bs: (n, ord) => {
|
|
|
134
134
|
},
|
|
135
135
|
|
|
136
136
|
ca: (n, ord) => {
|
|
137
|
-
const s = String(n).split('.'), v0 = !s[1];
|
|
137
|
+
const s = String(n).split('.'), i = s[0], v0 = !s[1], i1000000 = i.slice(-6);
|
|
138
138
|
if (ord) return (n == 1 || n == 3) ? 'one'
|
|
139
139
|
: n == 2 ? 'two'
|
|
140
140
|
: n == 4 ? 'few'
|
|
141
141
|
: 'other';
|
|
142
|
-
return n == 1 && v0 ? 'one'
|
|
142
|
+
return n == 1 && v0 ? 'one'
|
|
143
|
+
: i != 0 && i1000000 == 0 && v0 ? 'many'
|
|
144
|
+
: 'other';
|
|
143
145
|
},
|
|
144
146
|
|
|
145
147
|
ce: a,
|
|
@@ -218,7 +220,13 @@ en: (n, ord) => {
|
|
|
218
220
|
|
|
219
221
|
eo: a,
|
|
220
222
|
|
|
221
|
-
es:
|
|
223
|
+
es: (n, ord) => {
|
|
224
|
+
const s = String(n).split('.'), i = s[0], v0 = !s[1], i1000000 = i.slice(-6);
|
|
225
|
+
if (ord) return 'other';
|
|
226
|
+
return n == 1 ? 'one'
|
|
227
|
+
: i != 0 && i1000000 == 0 && v0 ? 'many'
|
|
228
|
+
: 'other';
|
|
229
|
+
},
|
|
222
230
|
|
|
223
231
|
et: d,
|
|
224
232
|
|
|
@@ -305,11 +313,10 @@ ha: a,
|
|
|
305
313
|
haw: a,
|
|
306
314
|
|
|
307
315
|
he: (n, ord) => {
|
|
308
|
-
const s = String(n).split('.'), i = s[0], v0 = !s[1]
|
|
316
|
+
const s = String(n).split('.'), i = s[0], v0 = !s[1];
|
|
309
317
|
if (ord) return 'other';
|
|
310
|
-
return
|
|
318
|
+
return i == 1 && v0 || i == 0 && !v0 ? 'one'
|
|
311
319
|
: i == 2 && v0 ? 'two'
|
|
312
|
-
: v0 && (n < 0 || n > 10) && t0 && n10 == 0 ? 'many'
|
|
313
320
|
: 'other';
|
|
314
321
|
},
|
|
315
322
|
|
|
@@ -322,6 +329,8 @@ hi: (n, ord) => {
|
|
|
322
329
|
return n >= 0 && n <= 1 ? 'one' : 'other';
|
|
323
330
|
},
|
|
324
331
|
|
|
332
|
+
hnj: e,
|
|
333
|
+
|
|
325
334
|
hr: (n, ord) => {
|
|
326
335
|
const 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);
|
|
327
336
|
if (ord) return 'other';
|
|
@@ -360,36 +369,27 @@ ii: e,
|
|
|
360
369
|
io: d,
|
|
361
370
|
|
|
362
371
|
is: (n, ord) => {
|
|
363
|
-
const s = String(n).split('.'), i = s[0], t0 = Number(s[0]) == n, i10 = i.slice(-1), i100 = i.slice(-2);
|
|
372
|
+
const 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);
|
|
364
373
|
if (ord) return 'other';
|
|
365
|
-
return t0 && i10 == 1 && i100 != 11 ||
|
|
374
|
+
return t0 && i10 == 1 && i100 != 11 || t % 10 == 1 && t % 100 != 11 ? 'one' : 'other';
|
|
366
375
|
},
|
|
367
376
|
|
|
368
377
|
it: (n, ord) => {
|
|
369
|
-
const s = String(n).split('.'), v0 = !s[1];
|
|
378
|
+
const s = String(n).split('.'), i = s[0], v0 = !s[1], i1000000 = i.slice(-6);
|
|
370
379
|
if (ord) return (n == 11 || n == 8 || n == 80 || n == 800) ? 'many' : 'other';
|
|
371
|
-
return n == 1 && v0 ? 'one' : 'other';
|
|
372
|
-
},
|
|
373
|
-
|
|
374
|
-
iu: f,
|
|
375
|
-
|
|
376
|
-
iw: (n, ord) => {
|
|
377
|
-
const s = String(n).split('.'), i = s[0], v0 = !s[1], t0 = Number(s[0]) == n, n10 = t0 && s[0].slice(-1);
|
|
378
|
-
if (ord) return 'other';
|
|
379
380
|
return n == 1 && v0 ? 'one'
|
|
380
|
-
: i ==
|
|
381
|
-
: v0 && (n < 0 || n > 10) && t0 && n10 == 0 ? 'many'
|
|
381
|
+
: i != 0 && i1000000 == 0 && v0 ? 'many'
|
|
382
382
|
: 'other';
|
|
383
383
|
},
|
|
384
384
|
|
|
385
|
+
iu: f,
|
|
386
|
+
|
|
385
387
|
ja: e,
|
|
386
388
|
|
|
387
389
|
jbo: e,
|
|
388
390
|
|
|
389
391
|
jgo: a,
|
|
390
392
|
|
|
391
|
-
ji: d,
|
|
392
|
-
|
|
393
393
|
jmc: a,
|
|
394
394
|
|
|
395
395
|
jv: e,
|
|
@@ -528,7 +528,7 @@ mo: (n, ord) => {
|
|
|
528
528
|
const s = String(n).split('.'), v0 = !s[1], t0 = Number(s[0]) == n, n100 = t0 && s[0].slice(-2);
|
|
529
529
|
if (ord) return n == 1 ? 'one' : 'other';
|
|
530
530
|
return n == 1 && v0 ? 'one'
|
|
531
|
-
: !v0 || n == 0 || (n100 >=
|
|
531
|
+
: !v0 || n == 0 || n != 1 && (n100 >= 1 && n100 <= 19) ? 'few'
|
|
532
532
|
: 'other';
|
|
533
533
|
},
|
|
534
534
|
|
|
@@ -549,7 +549,8 @@ mt: (n, ord) => {
|
|
|
549
549
|
const s = String(n).split('.'), t0 = Number(s[0]) == n, n100 = t0 && s[0].slice(-2);
|
|
550
550
|
if (ord) return 'other';
|
|
551
551
|
return n == 1 ? 'one'
|
|
552
|
-
: n ==
|
|
552
|
+
: n == 2 ? 'two'
|
|
553
|
+
: n == 0 || (n100 >= 3 && n100 <= 10) ? 'few'
|
|
553
554
|
: (n100 >= 11 && n100 <= 19) ? 'many'
|
|
554
555
|
: 'other';
|
|
555
556
|
},
|
|
@@ -630,12 +631,20 @@ prg: (n, ord) => {
|
|
|
630
631
|
ps: a,
|
|
631
632
|
|
|
632
633
|
pt: (n, ord) => {
|
|
633
|
-
const s = String(n).split('.'), i = s[0];
|
|
634
|
+
const s = String(n).split('.'), i = s[0], v0 = !s[1], i1000000 = i.slice(-6);
|
|
634
635
|
if (ord) return 'other';
|
|
635
|
-
return (i == 0 || i == 1) ? 'one'
|
|
636
|
+
return (i == 0 || i == 1) ? 'one'
|
|
637
|
+
: i != 0 && i1000000 == 0 && v0 ? 'many'
|
|
638
|
+
: 'other';
|
|
636
639
|
},
|
|
637
640
|
|
|
638
|
-
pt_PT:
|
|
641
|
+
pt_PT: (n, ord) => {
|
|
642
|
+
const s = String(n).split('.'), i = s[0], v0 = !s[1], i1000000 = i.slice(-6);
|
|
643
|
+
if (ord) return 'other';
|
|
644
|
+
return n == 1 && v0 ? 'one'
|
|
645
|
+
: i != 0 && i1000000 == 0 && v0 ? 'many'
|
|
646
|
+
: 'other';
|
|
647
|
+
},
|
|
639
648
|
|
|
640
649
|
rm: a,
|
|
641
650
|
|
|
@@ -643,14 +652,12 @@ ro: (n, ord) => {
|
|
|
643
652
|
const s = String(n).split('.'), v0 = !s[1], t0 = Number(s[0]) == n, n100 = t0 && s[0].slice(-2);
|
|
644
653
|
if (ord) return n == 1 ? 'one' : 'other';
|
|
645
654
|
return n == 1 && v0 ? 'one'
|
|
646
|
-
: !v0 || n == 0 || (n100 >=
|
|
655
|
+
: !v0 || n == 0 || n != 1 && (n100 >= 1 && n100 <= 19) ? 'few'
|
|
647
656
|
: 'other';
|
|
648
657
|
},
|
|
649
658
|
|
|
650
659
|
rof: a,
|
|
651
660
|
|
|
652
|
-
root: e,
|
|
653
|
-
|
|
654
661
|
ru: (n, ord) => {
|
|
655
662
|
const s = String(n).split('.'), i = s[0], v0 = !s[1], i10 = i.slice(-1), i100 = i.slice(-2);
|
|
656
663
|
if (ord) return 'other';
|
|
@@ -808,6 +815,8 @@ tn: a,
|
|
|
808
815
|
|
|
809
816
|
to: e,
|
|
810
817
|
|
|
818
|
+
tpi: e,
|
|
819
|
+
|
|
811
820
|
tr: a,
|
|
812
821
|
|
|
813
822
|
ts: a,
|
|
@@ -829,12 +838,22 @@ uk: (n, ord) => {
|
|
|
829
838
|
: 'other';
|
|
830
839
|
},
|
|
831
840
|
|
|
841
|
+
und: e,
|
|
842
|
+
|
|
832
843
|
ur: d,
|
|
833
844
|
|
|
834
845
|
uz: a,
|
|
835
846
|
|
|
836
847
|
ve: a,
|
|
837
848
|
|
|
849
|
+
vec: (n, ord) => {
|
|
850
|
+
const s = String(n).split('.'), i = s[0], v0 = !s[1], i1000000 = i.slice(-6);
|
|
851
|
+
if (ord) return (n == 11 || n == 8 || n == 80 || n == 800) ? 'many' : 'other';
|
|
852
|
+
return n == 1 && v0 ? 'one'
|
|
853
|
+
: i != 0 && i1000000 == 0 && v0 ? 'many'
|
|
854
|
+
: 'other';
|
|
855
|
+
},
|
|
856
|
+
|
|
838
857
|
vi: (n, ord) => {
|
|
839
858
|
if (ord) return n == 1 ? 'one' : 'other';
|
|
840
859
|
return 'other';
|
package/plurals.mjs
CHANGED
|
@@ -23,7 +23,6 @@ const f = (n, ord) => {
|
|
|
23
23
|
: 'other';
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
-
export const _in = e;
|
|
27
26
|
export const af = a;
|
|
28
27
|
export const ak = b;
|
|
29
28
|
export const am = c;
|
|
@@ -66,6 +65,7 @@ export const az = (n, ord) => {
|
|
|
66
65
|
: 'other';
|
|
67
66
|
return n == 1 ? 'one' : 'other';
|
|
68
67
|
};
|
|
68
|
+
export const bal = (n, ord) => n == 1 ? 'one' : 'other';
|
|
69
69
|
export const be = (n, ord) => {
|
|
70
70
|
const s = String(n).split('.'), t0 = Number(s[0]) == n, n10 = t0 && s[0].slice(-1), n100 = t0 && s[0].slice(-2);
|
|
71
71
|
if (ord) return (n10 == 2 || n10 == 3) && n100 != 12 && n100 != 13 ? 'few' : 'other';
|
|
@@ -106,12 +106,14 @@ export const bs = (n, ord) => {
|
|
|
106
106
|
: 'other';
|
|
107
107
|
};
|
|
108
108
|
export const ca = (n, ord) => {
|
|
109
|
-
const s = String(n).split('.'), v0 = !s[1];
|
|
109
|
+
const s = String(n).split('.'), i = s[0], v0 = !s[1], i1000000 = i.slice(-6);
|
|
110
110
|
if (ord) return (n == 1 || n == 3) ? 'one'
|
|
111
111
|
: n == 2 ? 'two'
|
|
112
112
|
: n == 4 ? 'few'
|
|
113
113
|
: 'other';
|
|
114
|
-
return n == 1 && v0 ? 'one'
|
|
114
|
+
return n == 1 && v0 ? 'one'
|
|
115
|
+
: i != 0 && i1000000 == 0 && v0 ? 'many'
|
|
116
|
+
: 'other';
|
|
115
117
|
};
|
|
116
118
|
export const ce = a;
|
|
117
119
|
export const ceb = (n, ord) => {
|
|
@@ -172,7 +174,13 @@ export const en = (n, ord) => {
|
|
|
172
174
|
return n == 1 && v0 ? 'one' : 'other';
|
|
173
175
|
};
|
|
174
176
|
export const eo = a;
|
|
175
|
-
export const es =
|
|
177
|
+
export const es = (n, ord) => {
|
|
178
|
+
const s = String(n).split('.'), i = s[0], v0 = !s[1], i1000000 = i.slice(-6);
|
|
179
|
+
if (ord) return 'other';
|
|
180
|
+
return n == 1 ? 'one'
|
|
181
|
+
: i != 0 && i1000000 == 0 && v0 ? 'many'
|
|
182
|
+
: 'other';
|
|
183
|
+
};
|
|
176
184
|
export const et = d;
|
|
177
185
|
export const eu = a;
|
|
178
186
|
export const fa = c;
|
|
@@ -239,11 +247,10 @@ export const gv = (n, ord) => {
|
|
|
239
247
|
export const ha = a;
|
|
240
248
|
export const haw = a;
|
|
241
249
|
export const he = (n, ord) => {
|
|
242
|
-
const s = String(n).split('.'), i = s[0], v0 = !s[1]
|
|
250
|
+
const s = String(n).split('.'), i = s[0], v0 = !s[1];
|
|
243
251
|
if (ord) return 'other';
|
|
244
|
-
return
|
|
252
|
+
return i == 1 && v0 || i == 0 && !v0 ? 'one'
|
|
245
253
|
: i == 2 && v0 ? 'two'
|
|
246
|
-
: v0 && (n < 0 || n > 10) && t0 && n10 == 0 ? 'many'
|
|
247
254
|
: 'other';
|
|
248
255
|
};
|
|
249
256
|
export const hi = (n, ord) => {
|
|
@@ -254,6 +261,7 @@ export const hi = (n, ord) => {
|
|
|
254
261
|
: 'other';
|
|
255
262
|
return n >= 0 && n <= 1 ? 'one' : 'other';
|
|
256
263
|
};
|
|
264
|
+
export const hnj = e;
|
|
257
265
|
export const hr = (n, ord) => {
|
|
258
266
|
const 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);
|
|
259
267
|
if (ord) return 'other';
|
|
@@ -283,28 +291,21 @@ export const ig = e;
|
|
|
283
291
|
export const ii = e;
|
|
284
292
|
export const io = d;
|
|
285
293
|
export const is = (n, ord) => {
|
|
286
|
-
const s = String(n).split('.'), i = s[0], t0 = Number(s[0]) == n, i10 = i.slice(-1), i100 = i.slice(-2);
|
|
294
|
+
const 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);
|
|
287
295
|
if (ord) return 'other';
|
|
288
|
-
return t0 && i10 == 1 && i100 != 11 ||
|
|
296
|
+
return t0 && i10 == 1 && i100 != 11 || t % 10 == 1 && t % 100 != 11 ? 'one' : 'other';
|
|
289
297
|
};
|
|
290
298
|
export const it = (n, ord) => {
|
|
291
|
-
const s = String(n).split('.'), v0 = !s[1];
|
|
299
|
+
const s = String(n).split('.'), i = s[0], v0 = !s[1], i1000000 = i.slice(-6);
|
|
292
300
|
if (ord) return (n == 11 || n == 8 || n == 80 || n == 800) ? 'many' : 'other';
|
|
293
|
-
return n == 1 && v0 ? 'one' : 'other';
|
|
294
|
-
};
|
|
295
|
-
export const iu = f;
|
|
296
|
-
export const iw = (n, ord) => {
|
|
297
|
-
const s = String(n).split('.'), i = s[0], v0 = !s[1], t0 = Number(s[0]) == n, n10 = t0 && s[0].slice(-1);
|
|
298
|
-
if (ord) return 'other';
|
|
299
301
|
return n == 1 && v0 ? 'one'
|
|
300
|
-
: i ==
|
|
301
|
-
: v0 && (n < 0 || n > 10) && t0 && n10 == 0 ? 'many'
|
|
302
|
+
: i != 0 && i1000000 == 0 && v0 ? 'many'
|
|
302
303
|
: 'other';
|
|
303
304
|
};
|
|
305
|
+
export const iu = f;
|
|
304
306
|
export const ja = e;
|
|
305
307
|
export const jbo = e;
|
|
306
308
|
export const jgo = a;
|
|
307
|
-
export const ji = d;
|
|
308
309
|
export const jmc = a;
|
|
309
310
|
export const jv = e;
|
|
310
311
|
export const jw = e;
|
|
@@ -407,7 +408,7 @@ export const mo = (n, ord) => {
|
|
|
407
408
|
const s = String(n).split('.'), v0 = !s[1], t0 = Number(s[0]) == n, n100 = t0 && s[0].slice(-2);
|
|
408
409
|
if (ord) return n == 1 ? 'one' : 'other';
|
|
409
410
|
return n == 1 && v0 ? 'one'
|
|
410
|
-
: !v0 || n == 0 || (n100 >=
|
|
411
|
+
: !v0 || n == 0 || n != 1 && (n100 >= 1 && n100 <= 19) ? 'few'
|
|
411
412
|
: 'other';
|
|
412
413
|
};
|
|
413
414
|
export const mr = (n, ord) => {
|
|
@@ -425,7 +426,8 @@ export const mt = (n, ord) => {
|
|
|
425
426
|
const s = String(n).split('.'), t0 = Number(s[0]) == n, n100 = t0 && s[0].slice(-2);
|
|
426
427
|
if (ord) return 'other';
|
|
427
428
|
return n == 1 ? 'one'
|
|
428
|
-
: n ==
|
|
429
|
+
: n == 2 ? 'two'
|
|
430
|
+
: n == 0 || (n100 >= 3 && n100 <= 10) ? 'few'
|
|
429
431
|
: (n100 >= 11 && n100 <= 19) ? 'many'
|
|
430
432
|
: 'other';
|
|
431
433
|
};
|
|
@@ -480,21 +482,28 @@ export const prg = (n, ord) => {
|
|
|
480
482
|
};
|
|
481
483
|
export const ps = a;
|
|
482
484
|
export const pt = (n, ord) => {
|
|
483
|
-
const s = String(n).split('.'), i = s[0];
|
|
485
|
+
const s = String(n).split('.'), i = s[0], v0 = !s[1], i1000000 = i.slice(-6);
|
|
486
|
+
if (ord) return 'other';
|
|
487
|
+
return (i == 0 || i == 1) ? 'one'
|
|
488
|
+
: i != 0 && i1000000 == 0 && v0 ? 'many'
|
|
489
|
+
: 'other';
|
|
490
|
+
};
|
|
491
|
+
export const pt_PT = (n, ord) => {
|
|
492
|
+
const s = String(n).split('.'), i = s[0], v0 = !s[1], i1000000 = i.slice(-6);
|
|
484
493
|
if (ord) return 'other';
|
|
485
|
-
return
|
|
494
|
+
return n == 1 && v0 ? 'one'
|
|
495
|
+
: i != 0 && i1000000 == 0 && v0 ? 'many'
|
|
496
|
+
: 'other';
|
|
486
497
|
};
|
|
487
|
-
export const pt_PT = d;
|
|
488
498
|
export const rm = a;
|
|
489
499
|
export const ro = (n, ord) => {
|
|
490
500
|
const s = String(n).split('.'), v0 = !s[1], t0 = Number(s[0]) == n, n100 = t0 && s[0].slice(-2);
|
|
491
501
|
if (ord) return n == 1 ? 'one' : 'other';
|
|
492
502
|
return n == 1 && v0 ? 'one'
|
|
493
|
-
: !v0 || n == 0 || (n100 >=
|
|
503
|
+
: !v0 || n == 0 || n != 1 && (n100 >= 1 && n100 <= 19) ? 'few'
|
|
494
504
|
: 'other';
|
|
495
505
|
};
|
|
496
506
|
export const rof = a;
|
|
497
|
-
export const root = e;
|
|
498
507
|
export const ru = (n, ord) => {
|
|
499
508
|
const s = String(n).split('.'), i = s[0], v0 = !s[1], i10 = i.slice(-1), i100 = i.slice(-2);
|
|
500
509
|
if (ord) return 'other';
|
|
@@ -608,6 +617,7 @@ export const tl = (n, ord) => {
|
|
|
608
617
|
};
|
|
609
618
|
export const tn = a;
|
|
610
619
|
export const to = e;
|
|
620
|
+
export const tpi = e;
|
|
611
621
|
export const tr = a;
|
|
612
622
|
export const ts = a;
|
|
613
623
|
export const tzm = (n, ord) => {
|
|
@@ -624,9 +634,17 @@ export const uk = (n, ord) => {
|
|
|
624
634
|
: v0 && i10 == 0 || v0 && (i10 >= 5 && i10 <= 9) || v0 && (i100 >= 11 && i100 <= 14) ? 'many'
|
|
625
635
|
: 'other';
|
|
626
636
|
};
|
|
637
|
+
export const und = e;
|
|
627
638
|
export const ur = d;
|
|
628
639
|
export const uz = a;
|
|
629
640
|
export const ve = a;
|
|
641
|
+
export const vec = (n, ord) => {
|
|
642
|
+
const s = String(n).split('.'), i = s[0], v0 = !s[1], i1000000 = i.slice(-6);
|
|
643
|
+
if (ord) return (n == 11 || n == 8 || n == 80 || n == 800) ? 'many' : 'other';
|
|
644
|
+
return n == 1 && v0 ? 'one'
|
|
645
|
+
: i != 0 && i1000000 == 0 && v0 ? 'many'
|
|
646
|
+
: 'other';
|
|
647
|
+
};
|
|
630
648
|
export const vi = (n, ord) => {
|
|
631
649
|
if (ord) return n == 1 ? 'one' : 'other';
|
|
632
650
|
return 'other';
|
package/ranges.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export const ga: (start: PluralCategory, end: PluralCategory) => "one" | "two" |
|
|
|
29
29
|
export const gl: (start: PluralCategory, end: PluralCategory) => "one" | "other";
|
|
30
30
|
export const gsw: (start: PluralCategory, end: PluralCategory) => "one" | "other";
|
|
31
31
|
export const gu: (start: PluralCategory, end: PluralCategory) => "one" | "other";
|
|
32
|
-
export const he: (start: PluralCategory, end: PluralCategory) => "
|
|
32
|
+
export const he: (start: PluralCategory, end: PluralCategory) => "other";
|
|
33
33
|
export const hi: (start: PluralCategory, end: PluralCategory) => "one" | "other";
|
|
34
34
|
export const hr: (start: PluralCategory, end: PluralCategory) => "one" | "few" | "other";
|
|
35
35
|
export const hu: (start: PluralCategory, end: PluralCategory) => "one" | "other";
|
package/ranges.js
CHANGED
|
@@ -72,13 +72,7 @@ gsw: c,
|
|
|
72
72
|
|
|
73
73
|
gu: c,
|
|
74
74
|
|
|
75
|
-
he:
|
|
76
|
-
(start === "many" && end === "many") ? "many"
|
|
77
|
-
: (start === "many" && end === "other") ? "many"
|
|
78
|
-
: (start === "one" && end === "many") ? "many"
|
|
79
|
-
: (start === "other" && end === "many") ? "many"
|
|
80
|
-
: "other"
|
|
81
|
-
),
|
|
75
|
+
he: a,
|
|
82
76
|
|
|
83
77
|
hi: c,
|
|
84
78
|
|
package/ranges.mjs
CHANGED
|
@@ -37,13 +37,7 @@ export const ga = c;
|
|
|
37
37
|
export const gl = c;
|
|
38
38
|
export const gsw = c;
|
|
39
39
|
export const gu = c;
|
|
40
|
-
export const he =
|
|
41
|
-
(start === "many" && end === "many") ? "many"
|
|
42
|
-
: (start === "many" && end === "other") ? "many"
|
|
43
|
-
: (start === "one" && end === "many") ? "many"
|
|
44
|
-
: (start === "other" && end === "many") ? "many"
|
|
45
|
-
: "other"
|
|
46
|
-
);
|
|
40
|
+
export const he = a;
|
|
47
41
|
export const hi = c;
|
|
48
42
|
export const hr = c;
|
|
49
43
|
export const hu = c;
|