make-plural 7.3.0 → 7.4.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 CHANGED
@@ -16,6 +16,7 @@ export const bem: (n: number | string) => "one" | "other";
16
16
  export const bez: (n: number | string) => "one" | "other";
17
17
  export const bg: (n: number | string) => "one" | "other";
18
18
  export const bho: (n: number | string) => "one" | "other";
19
+ export const blo: (n: number | string) => "zero" | "one" | "other";
19
20
  export const bm: (n: number | string) => "other";
20
21
  export const bn: (n: number | string) => "one" | "other";
21
22
  export const bo: (n: number | string) => "other";
package/cardinals.js CHANGED
@@ -70,6 +70,10 @@ bg: a,
70
70
 
71
71
  bho: b,
72
72
 
73
+ blo: (n) => n == 0 ? 'zero'
74
+ : n == 1 ? 'one'
75
+ : 'other',
76
+
73
77
  bm: e,
74
78
 
75
79
  bn: c,
package/cardinals.mjs CHANGED
@@ -48,6 +48,9 @@ export const bem = a;
48
48
  export const bez = a;
49
49
  export const bg = a;
50
50
  export const bho = b;
51
+ export const blo = (n) => n == 0 ? 'zero'
52
+ : n == 1 ? 'one'
53
+ : 'other';
51
54
  export const bm = e;
52
55
  export const bn = c;
53
56
  export const bo = e;
package/examples.d.ts CHANGED
@@ -14,6 +14,7 @@ export const bem: {"cardinal":{"one":["1","1.0","1.00","1.000","1.0000"],"other"
14
14
  export const bez: {"cardinal":{"one":["1","1.0","1.00","1.000","1.0000"],"other":["0","2","16","100","1000","10000","100000","1000000","0.0","0.9","1.1","1.6","10.0","100.0","1000.0","10000.0","100000.0","1000000.0"]},"ordinal":{}};
15
15
  export const bg: {"cardinal":{"one":["1","1.0","1.00","1.000","1.0000"],"other":["0","2","16","100","1000","10000","100000","1000000","0.0","0.9","1.1","1.6","10.0","100.0","1000.0","10000.0","100000.0","1000000.0"]},"ordinal":{"other":["0","15","100","1000","10000","100000","1000000"]}};
16
16
  export const bho: {"cardinal":{"one":["0","1","0.0","1.0","0.00","1.00","0.000","1.000","0.0000","1.0000"],"other":["2","17","100","1000","10000","100000","1000000","0.1","0.9","1.1","1.7","10.0","100.0","1000.0","10000.0","100000.0","1000000.0"]},"ordinal":{}};
17
+ export const blo: {"cardinal":{"zero":["0","0.0","0.00","0.000","0.0000"],"one":["1","1.0","1.00","1.000","1.0000"],"other":["2","16","100","1000","10000","100000","1000000","2.0","2.5","10.0","100.0","1000.0","10000.0","100000.0","1000000.0"]},"ordinal":{"zero":["0"],"one":["1"],"few":["2","6"],"other":["7","19","100","1000","10000","100000","1000000"]}};
17
18
  export const bm: {"cardinal":{"other":["0","15","100","1000","10000","100000","1000000","0.0","1.0","1.5","10.0","100.0","1000.0","10000.0","100000.0","1000000.0"]},"ordinal":{}};
18
19
  export const bn: {"cardinal":{"one":["0","1","0.0","1.0","0.00","0.04"],"other":["2","17","100","1000","10000","100000","1000000","1.1","2.6","10.0","100.0","1000.0","10000.0","100000.0","1000000.0"]},"ordinal":{"one":["1","5","7","10"],"two":["2","3"],"few":["4"],"many":["6"],"other":["0","11","25","100","1000","10000","100000","1000000"]}};
19
20
  export const bo: {"cardinal":{"other":["0","15","100","1000","10000","100000","1000000","0.0","1.0","1.5","10.0","100.0","1000.0","10000.0","100000.0","1000000.0"]},"ordinal":{}};
package/examples.js CHANGED
@@ -28,6 +28,7 @@ bem: c,
28
28
  bez: c,
29
29
  bg: a,
30
30
  bho: b,
31
+ blo: {"cardinal":{"zero":["0","0.0","0.00","0.000","0.0000"],"one":["1","1.0","1.00","1.000","1.0000"],"other":["2","16","100","1000","10000","100000","1000000","2.0","2.5","10.0","100.0","1000.0","10000.0","100000.0","1000000.0"]},"ordinal":{"zero":["0"],"one":["1"],"few":["2","6"],"other":["7","19","100","1000","10000","100000","1000000"]}},
31
32
  bm: e,
32
33
  bn: {"cardinal":{"one":["0","1","0.0","1.0","0.00","0.04"],"other":["2","17","100","1000","10000","100000","1000000","1.1","2.6","10.0","100.0","1000.0","10000.0","100000.0","1000000.0"]},"ordinal":{"one":["1","5","7","10"],"two":["2","3"],"few":["4"],"many":["6"],"other":["0","11","25","100","1000","10000","100000","1000000"]}},
33
34
  bo: e,
package/examples.json CHANGED
@@ -15,6 +15,7 @@
15
15
  "bez": {"cardinal":{"one":["1","1.0","1.00","1.000","1.0000"],"other":["0","2","16","100","1000","10000","100000","1000000","0.0","0.9","1.1","1.6","10.0","100.0","1000.0","10000.0","100000.0","1000000.0"]},"ordinal":{}},
16
16
  "bg": {"cardinal":{"one":["1","1.0","1.00","1.000","1.0000"],"other":["0","2","16","100","1000","10000","100000","1000000","0.0","0.9","1.1","1.6","10.0","100.0","1000.0","10000.0","100000.0","1000000.0"]},"ordinal":{"other":["0","15","100","1000","10000","100000","1000000"]}},
17
17
  "bho": {"cardinal":{"one":["0","1","0.0","1.0","0.00","1.00","0.000","1.000","0.0000","1.0000"],"other":["2","17","100","1000","10000","100000","1000000","0.1","0.9","1.1","1.7","10.0","100.0","1000.0","10000.0","100000.0","1000000.0"]},"ordinal":{}},
18
+ "blo": {"cardinal":{"zero":["0","0.0","0.00","0.000","0.0000"],"one":["1","1.0","1.00","1.000","1.0000"],"other":["2","16","100","1000","10000","100000","1000000","2.0","2.5","10.0","100.0","1000.0","10000.0","100000.0","1000000.0"]},"ordinal":{"zero":["0"],"one":["1"],"few":["2","6"],"other":["7","19","100","1000","10000","100000","1000000"]}},
18
19
  "bm": {"cardinal":{"other":["0","15","100","1000","10000","100000","1000000","0.0","1.0","1.5","10.0","100.0","1000.0","10000.0","100000.0","1000000.0"]},"ordinal":{}},
19
20
  "bn": {"cardinal":{"one":["0","1","0.0","1.0","0.00","0.04"],"other":["2","17","100","1000","10000","100000","1000000","1.1","2.6","10.0","100.0","1000.0","10000.0","100000.0","1000000.0"]},"ordinal":{"one":["1","5","7","10"],"two":["2","3"],"few":["4"],"many":["6"],"other":["0","11","25","100","1000","10000","100000","1000000"]}},
20
21
  "bo": {"cardinal":{"other":["0","15","100","1000","10000","100000","1000000","0.0","1.0","1.5","10.0","100.0","1000.0","10000.0","100000.0","1000000.0"]},"ordinal":{}},
package/examples.mjs CHANGED
@@ -22,6 +22,7 @@ export const bem = c;
22
22
  export const bez = c;
23
23
  export const bg = a;
24
24
  export const bho = b;
25
+ export const blo = {"cardinal":{"zero":["0","0.0","0.00","0.000","0.0000"],"one":["1","1.0","1.00","1.000","1.0000"],"other":["2","16","100","1000","10000","100000","1000000","2.0","2.5","10.0","100.0","1000.0","10000.0","100000.0","1000000.0"]},"ordinal":{"zero":["0"],"one":["1"],"few":["2","6"],"other":["7","19","100","1000","10000","100000","1000000"]}};
25
26
  export const bm = e;
26
27
  export const bn = {"cardinal":{"one":["0","1","0.0","1.0","0.00","0.04"],"other":["2","17","100","1000","10000","100000","1000000","1.1","2.6","10.0","100.0","1000.0","10000.0","100000.0","1000000.0"]},"ordinal":{"one":["1","5","7","10"],"two":["2","3"],"few":["4"],"many":["6"],"other":["0","11","25","100","1000","10000","100000","1000000"]}};
27
28
  export const bo = e;
package/ordinals.d.ts CHANGED
@@ -10,6 +10,7 @@ export const az: (n: number | string) => "one" | "few" | "many" | "other";
10
10
  export const bal: (n: number | string) => "one" | "other";
11
11
  export const be: (n: number | string) => "few" | "other";
12
12
  export const bg: (n: number | string) => "other";
13
+ export const blo: (n: number | string) => "zero" | "one" | "few" | "other";
13
14
  export const bn: (n: number | string) => "one" | "two" | "few" | "many" | "other";
14
15
  export const bs: (n: number | string) => "other";
15
16
  export const ca: (n: number | string) => "one" | "two" | "few" | "other";
package/ordinals.js CHANGED
@@ -40,6 +40,14 @@ be: (n) => {
40
40
 
41
41
  bg: a,
42
42
 
43
+ blo: (n) => {
44
+ const s = String(n).split('.'), i = s[0];
45
+ return i == 0 ? 'zero'
46
+ : i == 1 ? 'one'
47
+ : (i == 2 || i == 3 || i == 4 || i == 5 || i == 6) ? 'few'
48
+ : 'other';
49
+ },
50
+
43
51
  bn: (n) => (n == 1 || n == 5 || n == 7 || n == 8 || n == 9 || n == 10) ? 'one'
44
52
  : (n == 2 || n == 3) ? 'two'
45
53
  : n == 4 ? 'few'
package/ordinals.mjs CHANGED
@@ -24,6 +24,13 @@ export const be = (n) => {
24
24
  return (n10 == 2 || n10 == 3) && n100 != 12 && n100 != 13 ? 'few' : 'other';
25
25
  };
26
26
  export const bg = a;
27
+ export const blo = (n) => {
28
+ const s = String(n).split('.'), i = s[0];
29
+ return i == 0 ? 'zero'
30
+ : i == 1 ? 'one'
31
+ : (i == 2 || i == 3 || i == 4 || i == 5 || i == 6) ? 'few'
32
+ : 'other';
33
+ };
27
34
  export const bn = (n) => (n == 1 || n == 5 || n == 7 || n == 8 || n == 9 || n == 10) ? 'one'
28
35
  : (n == 2 || n == 3) ? 'two'
29
36
  : n == 4 ? 'few'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "make-plural",
3
- "version": "7.3.0",
3
+ "version": "7.4.0",
4
4
  "description": "Unicode CLDR pluralization rules as JavaScript functions",
5
5
  "keywords": [
6
6
  "unicode",
@@ -16,6 +16,7 @@ export const bem: {cardinal:["one","other"],ordinal:["other"]};
16
16
  export const bez: {cardinal:["one","other"],ordinal:["other"]};
17
17
  export const bg: {cardinal:["one","other"],ordinal:["other"]};
18
18
  export const bho: {cardinal:["one","other"],ordinal:["other"]};
19
+ export const blo: {cardinal:["zero","one","other"],ordinal:["zero","one","few","other"]};
19
20
  export const bm: {cardinal:["other"],ordinal:["other"]};
20
21
  export const bn: {cardinal:["one","other"],ordinal:["one","two","few","many","other"]};
21
22
  export const bo: {cardinal:["other"],ordinal:["other"]};
@@ -26,6 +26,7 @@ bem: a,
26
26
  bez: a,
27
27
  bg: a,
28
28
  bho: a,
29
+ blo: {cardinal:[z,o,x],ordinal:[z,o,f,x]},
29
30
  bm: c,
30
31
  bn: {cardinal:[o,x],ordinal:[o,t,f,m,x]},
31
32
  bo: c,
@@ -20,6 +20,7 @@ export const bem = a;
20
20
  export const bez = a;
21
21
  export const bg = a;
22
22
  export const bho = a;
23
+ export const blo = {cardinal:[z,o,x],ordinal:[z,o,f,x]};
23
24
  export const bm = c;
24
25
  export const bn = {cardinal:[o,x],ordinal:[o,t,f,m,x]};
25
26
  export const bo = c;
package/plurals.d.ts CHANGED
@@ -16,6 +16,7 @@ export const bem: (n: number | string, ord?: boolean) => "one" | "other";
16
16
  export const bez: (n: number | string, ord?: boolean) => "one" | "other";
17
17
  export const bg: (n: number | string, ord?: boolean) => "one" | "other";
18
18
  export const bho: (n: number | string, ord?: boolean) => "one" | "other";
19
+ export const blo: (n: number | string, ord?: boolean) => "zero" | "one" | "few" | "other";
19
20
  export const bm: (n: number | string, ord?: boolean) => "other";
20
21
  export const bn: (n: number | string, ord?: boolean) => "one" | "two" | "few" | "many" | "other";
21
22
  export const bo: (n: number | string, ord?: boolean) => "other";
package/plurals.js CHANGED
@@ -100,6 +100,17 @@ bg: a,
100
100
 
101
101
  bho: b,
102
102
 
103
+ blo: (n, ord) => {
104
+ const s = String(n).split('.'), i = s[0];
105
+ if (ord) return i == 0 ? 'zero'
106
+ : i == 1 ? 'one'
107
+ : (i == 2 || i == 3 || i == 4 || i == 5 || i == 6) ? 'few'
108
+ : 'other';
109
+ return n == 0 ? 'zero'
110
+ : n == 1 ? 'one'
111
+ : 'other';
112
+ },
113
+
103
114
  bm: e,
104
115
 
105
116
  bn: (n, ord) => {
package/plurals.mjs CHANGED
@@ -78,6 +78,16 @@ export const bem = a;
78
78
  export const bez = a;
79
79
  export const bg = a;
80
80
  export const bho = b;
81
+ export const blo = (n, ord) => {
82
+ const s = String(n).split('.'), i = s[0];
83
+ if (ord) return i == 0 ? 'zero'
84
+ : i == 1 ? 'one'
85
+ : (i == 2 || i == 3 || i == 4 || i == 5 || i == 6) ? 'few'
86
+ : 'other';
87
+ return n == 0 ? 'zero'
88
+ : n == 1 ? 'one'
89
+ : 'other';
90
+ };
81
91
  export const bm = e;
82
92
  export const bn = (n, ord) => {
83
93
  if (ord) return (n == 1 || n == 5 || n == 7 || n == 8 || n == 9 || n == 10) ? 'one'