Comparing version 26.0.0 to 26.0.1
{ | ||
"name": "cldr-data", | ||
"version": "26.0.0", | ||
"version": "26.0.1", | ||
"keywords": [ | ||
@@ -5,0 +5,0 @@ "unicode", |
@@ -1,10 +0,22 @@ | ||
# cldr-data-npm | ||
# Npm's cldr-data | ||
Npm module for [Unicode CLDR JSON][] data | ||
Npm module for [Unicode CLDR JSON][] data. | ||
[Unicode CLDR JSON]: http://cldr.unicode.org/index/cldr-spec/json | ||
## Goal | ||
- Allow i18n libraries to define CLDR data as versioned "peer" dependency. | ||
- Provide tools to assist (in other words, ease the pain) on fetching the data. | ||
Bonus goals | ||
- Optimal for backend development. (Frontend, see [Bower's cldr-data][]). | ||
- Optimal for Node.js environment. (AMD, see [Bower's cldr-data][]). | ||
[Bower's cldr-data]: https://github.com/rxaviers/cldr-data-bower | ||
## Usage | ||
On the `package.json` of your i18n library, define which CLDR versions it's | ||
On the `package.json` of your i18n library, define its CLDR data dependency. | ||
compatible with. | ||
@@ -34,26 +46,12 @@ | ||
For your convinience, use cldr-data in conjunction of [cldr.js][]. | ||
For your convinience, use cldr-data in conjunction of [cldr.js][]. You can find | ||
more details switching to the [Foo Number Format Library Example][] or | ||
[Application Example][] branches. | ||
[Foo Number Format Library Example]: https://github.com/rxaviers/cldr-data-npm/tree/example-library-foo | ||
[Application Example]: https://github.com/rxaviers/cldr-data-npm/tree/example-application | ||
[cldr.js]: https://github.com/rxaviers/cldrjs | ||
```javascript | ||
Cldr = require("cldrjs") | ||
cldr = require("cldr-data"); | ||
Cldr.load(cldr("supplemental/plurals")); | ||
function Pluralize(locale) { | ||
locale = new Cldr(locale); | ||
// Your awesome pluralization logic | ||
pluralForm = doAwesomeStuffWith( | ||
locale.supplemental("plurals-type-cardinal/{language}") | ||
); | ||
return pluralForm; | ||
} | ||
``` | ||
## License | ||
MIT © [Rafael Xavier de Souza](http://rafael.xavier.blog.br) |
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
7599
54622
9
80
57