Gathering detailed insights and metrics for cldr-data
Gathering detailed insights and metrics for cldr-data
Gathering detailed insights and metrics for cldr-data
Gathering detailed insights and metrics for cldr-data
npm install cldr-data
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
42 Stars
111 Commits
28 Forks
6 Watching
16 Branches
12 Contributors
Updated on 28 Jun 2024
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
-8.1%
11,701
Compared to previous day
Last week
-11.9%
60,348
Compared to previous week
Last month
17.5%
277,158
Compared to previous month
Last year
10.2%
3,101,803
Compared to previous year
2
4
Npm module for Unicode CLDR JSON data.
Bonus goals
On the package.json
of your i18n library, define its CLDR data dependency by
using the peerDependencies property.
"peerDependencies": {
"cldr-data": ">=26"
}
On your library, access CLDR JSON data using require("cldr-data")
.
1function Pluralize(locale) { 2 var plurals = require("cldr-data/supplemental/plurals"); 3 var language = extractLanguageFrom(locale); 4 5 // Your awesome pluralization logic 6 pluralForm = doAwesomeStuffWith( 7 plurals.supplemental["plurals-type-cardinal"][language] 8 ); 9 10 return pluralForm; 11}
For your convinience, use cldr-data in conjunction with cldr.js. You can find more details switching to the Foo Number Format Library Example or Application Example branches.
On the package.json
of your applications, define its CLDR data dependency by
using the dependencies or devDependencies property.
"dependencies": {
"cldr-data": "26",
"libraries-that-use-cldr-data": "x"
}
By default, the locale coverage installed is core, which Unicode defines as
the top tier languages and is equivalent to the json.zip
content. There are
two ways to modify the installation and get the full coverage instead.
Use the environment variable CLDR_COVERAGE
On the command line, set the locale coverage using the environment variable.
$ CLDR_COVERAGE=full npm install
Use the package.json cldr-data-coverage
property
On the package.json
of you application, set the locale coverage using the
cldr-data-coverage
property.
{
...
"cldr-data-coverage": "full",
...
}
By default, used file urls.json
form cldr-data module, which contain
for each locale coverage 18 urls. For set custom .json
file, that have
structure accoding urls.json
use cldr-data-urls-json
property in package.json
your webApp
Define the package.json cldr-data-urls-json
property
{
...
"cldr-data-urls-json": "../../cldrdatadwnl.json",
...
}
Path must be relative from cldr-data directory
Example custom cldrdatadwnl.json File have only 7 urls.
{
"core": [
"https://github.com/unicode-cldr/cldr-core/archive/30.0.3.zip",
"https://github.com/unicode-cldr/cldr-dates-modern/archive/30.0.3.zip",
"https://github.com/unicode-cldr/cldr-localenames-modern/archive/30.0.3.zip",
"https://github.com/unicode-cldr/cldr-misc-modern/archive/30.0.3.zip",
"https://github.com/unicode-cldr/cldr-numbers-modern/archive/30.0.3.zip",
"https://github.com/unicode-cldr/cldr-segments-modern/archive/30.0.3.zip",
"https://github.com/unicode-cldr/cldr-units-modern/archive/30.0.3.zip"
]
}
Or you can filter existing urls by regexp pattern, via cldr-data-urls-filter
field in package.json
:
{
...
"cldr-data-urls-filter": "(cldr-core|cldr-numbers-modern|cldr-dates-modern)",
...
}
MIT © Rafael Xavier de Souza
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
7 existing vulnerabilities detected
Details
Reason
Found 5/27 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More