make-plural
Advanced tools
Comparing version 2.0.0 to 2.1.0
@@ -207,2 +207,4 @@ /** | ||
exports.get = MakePlural; | ||
} else if (typeof define !== 'undefined' && define.amd) { | ||
define('make-plural', function() { return MakePlural; }); | ||
} else { | ||
@@ -209,0 +211,0 @@ try { MakePlural.src_url = Array.prototype.slice.call(document.getElementsByTagName('script')).pop().src; } |
{ | ||
"name": "make-plural", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "Translates Unicode CLDR pluralization rules to executable JavaScript", | ||
@@ -5,0 +5,0 @@ "keywords": ["unicode", "cldr", "i18n", "internationalization", "pluralization"], |
@@ -8,3 +8,5 @@ make-plural | ||
Can be used as a CommonJS or AMD module, or directly in a browser environment. | ||
## Installation | ||
@@ -26,3 +28,6 @@ | ||
> console.log(MakePlural('sk').toString()) | ||
> sk = MakePlural('sk') | ||
{ [Function] toString: [Function] } | ||
> console.log(sk.toString()) | ||
function(n) { | ||
@@ -36,5 +41,2 @@ var s = String(n).split('.'), i = s[0], v0 = !s[1]; | ||
> sk = MakePlural('sk') | ||
{ [Function] toString: [Function] } | ||
> sk(1) | ||
@@ -52,3 +54,6 @@ 'one' | ||
> console.log(MakePlural('en', {'ordinals':1}).toString()) | ||
> en = MakePlural('en', {ordinals:1}) | ||
{ [Function] toString: [Function] } | ||
> console.log(en.toString()) | ||
function(n,ord) { | ||
@@ -64,5 +69,2 @@ var s = String(n).split('.'), v0 = !s[1], t0 = Number(s[0]) == n, | ||
> en = MakePlural('en', {'ordinals':1}) | ||
{ [Function] toString: [Function] } | ||
> en(2) | ||
@@ -80,4 +82,4 @@ 'other' | ||
<script> | ||
console.log(MakePlural('ru', {'ordinals':1}).toString()); | ||
var ru = MakePlural('ru', {'ordinals':1}); | ||
var ru = MakePlural('ru', {ordinals:1}); | ||
console.log(ru.toString()); | ||
console.log('1: ' + ru(1) + ', 3.0: ' + ru(3.0) + | ||
@@ -84,0 +86,0 @@ ', "1.0": ' + ru('1.0') + ', "0": ' + ru('0')); |
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
93901
7
1347
196