@phensley/plurals
Advanced tools
Comparing version 1.3.3 to 1.4.0
@@ -27,2 +27,3 @@ // | ||
az: [[1, [[0]]]], | ||
bal: [[1, [[0]]]], | ||
be: [ | ||
@@ -104,3 +105,6 @@ [1, [[9, 10]]], | ||
eo: [[1, [[0]]]], | ||
es: [[1, [[0]]]], | ||
es: [ | ||
[1, [[0]]], | ||
[4, [[46, 47, 48, 8], [49]]] | ||
], | ||
et: [[1, [[7, 8]]]], | ||
@@ -157,2 +161,3 @@ eu: [[1, [[0]]]], | ||
hi: [[1, [[2], [0]]]], | ||
hnj: [], | ||
hr: [ | ||
@@ -185,6 +190,8 @@ [ | ||
ii: [], | ||
in: [], | ||
io: [[1, [[7, 8]]]], | ||
is: [[1, [[59, 23, 24], [38]]]], | ||
it: [[1, [[7, 8]]]], | ||
it: [ | ||
[1, [[7, 8]]], | ||
[4, [[46, 47, 48, 8], [49]]] | ||
], | ||
iu: [ | ||
@@ -194,11 +201,5 @@ [1, [[0]]], | ||
], | ||
iw: [ | ||
[1, [[7, 8]]], | ||
[2, [[57, 8]]], | ||
[4, [[8, 58, 13]]] | ||
], | ||
ja: [], | ||
jbo: [], | ||
jgo: [[1, [[0]]]], | ||
ji: [[1, [[7, 8]]]], | ||
jmc: [[1, [[0]]]], | ||
@@ -334,4 +335,10 @@ jv: [], | ||
ps: [[1, [[0]]]], | ||
pt: [[1, [[80]]]], | ||
'pt-PT': [[1, [[7, 8]]]], | ||
pt: [ | ||
[1, [[80]]], | ||
[4, [[46, 47, 48, 8], [49]]] | ||
], | ||
'pt-PT': [ | ||
[1, [[7, 8]]], | ||
[4, [[46, 47, 48, 8], [49]]] | ||
], | ||
rm: [[1, [[0]]]], | ||
@@ -343,3 +350,2 @@ ro: [ | ||
rof: [[1, [[0]]]], | ||
root: [], | ||
ru: [ | ||
@@ -471,2 +477,3 @@ [1, [[8, 23, 24]]], | ||
to: [], | ||
tpi: [], | ||
tr: [[1, [[0]]]], | ||
@@ -488,2 +495,3 @@ ts: [[1, [[0]]]], | ||
], | ||
und: [], | ||
ur: [[1, [[7, 8]]]], | ||
@@ -522,2 +530,3 @@ uz: [[1, [[0]]]], | ||
], | ||
bal: [[1, [[0]]]], | ||
be: [[3, [[96, 97]]]], | ||
@@ -590,6 +599,4 @@ bg: [], | ||
id: [], | ||
in: [], | ||
is: [], | ||
it: [[4, [[107]]]], | ||
iw: [], | ||
ja: [], | ||
@@ -644,3 +651,2 @@ ka: [ | ||
ro: [[1, [[0]]]], | ||
root: [], | ||
ru: [], | ||
@@ -666,4 +672,6 @@ sc: [[4, [[107]]]], | ||
tl: [[1, [[0]]]], | ||
tpi: [], | ||
tr: [], | ||
uk: [[3, [[103, 104]]]], | ||
und: [], | ||
ur: [], | ||
@@ -670,0 +678,0 @@ uz: [], |
@@ -42,6 +42,8 @@ import { coerceDecimal } from '@phensley/decimal'; | ||
PluralRulesImpl.prototype.evaluate = function (operands, rules) { | ||
for (var _i = 0, rules_1 = rules; _i < rules_1.length; _i++) { | ||
var rule = rules_1[_i]; | ||
if (this.execute(operands, rule[1])) { | ||
return rule[0]; | ||
if (rules) { | ||
for (var _i = 0, rules_1 = rules; _i < rules_1.length; _i++) { | ||
var rule = rules_1[_i]; | ||
if (this.execute(operands, rule[1])) { | ||
return rule[0]; | ||
} | ||
} | ||
@@ -48,0 +50,0 @@ } |
@@ -30,2 +30,3 @@ "use strict"; | ||
az: [[1, [[0]]]], | ||
bal: [[1, [[0]]]], | ||
be: [ | ||
@@ -107,3 +108,6 @@ [1, [[9, 10]]], | ||
eo: [[1, [[0]]]], | ||
es: [[1, [[0]]]], | ||
es: [ | ||
[1, [[0]]], | ||
[4, [[46, 47, 48, 8], [49]]] | ||
], | ||
et: [[1, [[7, 8]]]], | ||
@@ -160,2 +164,3 @@ eu: [[1, [[0]]]], | ||
hi: [[1, [[2], [0]]]], | ||
hnj: [], | ||
hr: [ | ||
@@ -188,6 +193,8 @@ [ | ||
ii: [], | ||
in: [], | ||
io: [[1, [[7, 8]]]], | ||
is: [[1, [[59, 23, 24], [38]]]], | ||
it: [[1, [[7, 8]]]], | ||
it: [ | ||
[1, [[7, 8]]], | ||
[4, [[46, 47, 48, 8], [49]]] | ||
], | ||
iu: [ | ||
@@ -197,11 +204,5 @@ [1, [[0]]], | ||
], | ||
iw: [ | ||
[1, [[7, 8]]], | ||
[2, [[57, 8]]], | ||
[4, [[8, 58, 13]]] | ||
], | ||
ja: [], | ||
jbo: [], | ||
jgo: [[1, [[0]]]], | ||
ji: [[1, [[7, 8]]]], | ||
jmc: [[1, [[0]]]], | ||
@@ -337,4 +338,10 @@ jv: [], | ||
ps: [[1, [[0]]]], | ||
pt: [[1, [[80]]]], | ||
'pt-PT': [[1, [[7, 8]]]], | ||
pt: [ | ||
[1, [[80]]], | ||
[4, [[46, 47, 48, 8], [49]]] | ||
], | ||
'pt-PT': [ | ||
[1, [[7, 8]]], | ||
[4, [[46, 47, 48, 8], [49]]] | ||
], | ||
rm: [[1, [[0]]]], | ||
@@ -346,3 +353,2 @@ ro: [ | ||
rof: [[1, [[0]]]], | ||
root: [], | ||
ru: [ | ||
@@ -474,2 +480,3 @@ [1, [[8, 23, 24]]], | ||
to: [], | ||
tpi: [], | ||
tr: [[1, [[0]]]], | ||
@@ -491,2 +498,3 @@ ts: [[1, [[0]]]], | ||
], | ||
und: [], | ||
ur: [[1, [[7, 8]]]], | ||
@@ -525,2 +533,3 @@ uz: [[1, [[0]]]], | ||
], | ||
bal: [[1, [[0]]]], | ||
be: [[3, [[96, 97]]]], | ||
@@ -593,6 +602,4 @@ bg: [], | ||
id: [], | ||
in: [], | ||
is: [], | ||
it: [[4, [[107]]]], | ||
iw: [], | ||
ja: [], | ||
@@ -647,3 +654,2 @@ ka: [ | ||
ro: [[1, [[0]]]], | ||
root: [], | ||
ru: [], | ||
@@ -669,4 +675,6 @@ sc: [[4, [[107]]]], | ||
tl: [[1, [[0]]]], | ||
tpi: [], | ||
tr: [], | ||
uk: [[3, [[103, 104]]]], | ||
und: [], | ||
ur: [], | ||
@@ -673,0 +681,0 @@ uz: [], |
@@ -45,6 +45,8 @@ "use strict"; | ||
PluralRulesImpl.prototype.evaluate = function (operands, rules) { | ||
for (var _i = 0, rules_1 = rules; _i < rules_1.length; _i++) { | ||
var rule = rules_1[_i]; | ||
if (this.execute(operands, rule[1])) { | ||
return rule[0]; | ||
if (rules) { | ||
for (var _i = 0, rules_1 = rules; _i < rules_1.length; _i++) { | ||
var rule = rules_1[_i]; | ||
if (this.execute(operands, rule[1])) { | ||
return rule[0]; | ||
} | ||
} | ||
@@ -51,0 +53,0 @@ } |
{ | ||
"name": "@phensley/plurals", | ||
"version": "1.3.3", | ||
"version": "1.4.0", | ||
"description": "Plural rules engine", | ||
@@ -39,3 +39,3 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@phensley/decimal": "~1.3.3", | ||
"@phensley/decimal": "~1.4.0", | ||
"tslib": "^2.3.1" | ||
@@ -74,3 +74,3 @@ }, | ||
}, | ||
"gitHead": "c376fb22f40bc3f51fd7644d0f2d1643f009760b" | ||
"gitHead": "2fd52de6077fc308ef45143d076ecd5c84765a1b" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
257550
3120
+ Added@phensley/decimal@1.4.1(transitive)
- Removed@phensley/decimal@1.3.3(transitive)
Updated@phensley/decimal@~1.4.0