node-gettext
Advanced tools
Comparing version 2.1.0 to 3.0.0
@@ -41,11 +41,3 @@ 'use strict'; | ||
// Set debug flag | ||
if ('debug' in options) { | ||
this.debug = options.debug === true; | ||
} | ||
else if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV) { | ||
this.debug = process.env.NODE_ENV !== 'production'; | ||
} | ||
else { | ||
this.debug = false; | ||
} | ||
this.debug = 'debug' in options && options.debug === true; | ||
} | ||
@@ -108,3 +100,3 @@ | ||
this.emit('error', message); | ||
this.emit('error', new Error(message)); | ||
}; | ||
@@ -111,0 +103,0 @@ |
@@ -1702,18 +1702,18 @@ 'use strict'; | ||
examples: [{ | ||
plural: 1, | ||
plural: 0, | ||
sample: 1 | ||
}, { | ||
plural: 2, | ||
plural: 1, | ||
sample: 2 | ||
}, { | ||
plural: 3, | ||
plural: 2, | ||
sample: 3 | ||
}, { | ||
plural: 0, | ||
plural: 3, | ||
sample: 5 | ||
}], | ||
nplurals: 4, | ||
pluralsText: 'nplurals = 4; plural = (n % 100 === 1 ? 1 : n % 100 === 2 ? 2 : n % 100 === 3 || n % 100 === 4 ? 3 : 0)', | ||
pluralsText: 'nplurals = 4; plural = (n % 100 === 1 ? 0 : n % 100 === 2 ? 1 : n % 100 === 3 || n % 100 === 4 ? 2 : 3)', | ||
pluralsFunc: function(n) { | ||
return (n % 100 === 1 ? 1 : n % 100 === 2 ? 2 : n % 100 === 3 || n % 100 === 4 ? 3 : 0); | ||
return (n % 100 === 1 ? 0 : n % 100 === 2 ? 1 : n % 100 === 3 || n % 100 === 4 ? 2 : 3); | ||
} | ||
@@ -2066,2 +2066,2 @@ }, | ||
} | ||
}; | ||
}; |
{ | ||
"name": "node-gettext", | ||
"description": "A JavaScript implementation of gettext, a localization framework", | ||
"version": "2.1.0", | ||
"version": "3.0.0", | ||
"author": "Andris Reinman", | ||
@@ -46,3 +46,3 @@ "maintainers": [ | ||
"engine": { | ||
"node": ">=0.6" | ||
"node": ">=10" | ||
}, | ||
@@ -49,0 +49,0 @@ "keywords": [ |
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
1
94981
2801