Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cldr-data

Package Overview
Dependencies
Maintainers
1
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cldr-data - npm Package Compare versions

Comparing version 29.0.2 to 29.0.3

38

install.js

@@ -76,2 +76,3 @@ /**

if (process.env.CLDR_URL) {
console.warn("CLDR_URL is deprecated, use CLDR_DATA_URLS_JSON instead.")
srcUrl = srcUrl.replace(

@@ -83,21 +84,30 @@ "http://www.unicode.org/Public/cldr",

} else {
srcUrl = path.join(__dirname, "./urls.json");
if (parentPackage && parentPackage["cldr-data-coverage"] && (
(parentPackage.dependencies && parentPackage.dependencies["cldr-data"]) ||
(parentPackage.devDependencies && parentPackage.devDependencies["cldr-data"])
)) {
coverage = parentPackage["cldr-data-coverage"];
if (process.env.CLDR_DATA_URLS_JSON) {
srcUrl = process.env.CLDR_DATA_URLS_JSON;
} else if (parentPackage && parentPackage["cldr-data-urls-json"]) {
srcUrl = parentPackage["cldr-data-urls-json"];
} else {
srcUrl = path.join(__dirname, "./urls.json");
}
}
if (process.env.CLDR_COVERAGE) {
coverage = process.env.CLDR_COVERAGE;
}
if (process.env.CLDR_COVERAGE) {
coverage = process.env.CLDR_COVERAGE;
} else if (parentPackage && parentPackage["cldr-data-coverage"] && (
(parentPackage.dependencies && parentPackage.dependencies["cldr-data"]) ||
(parentPackage.devDependencies && parentPackage.devDependencies["cldr-data"])
)) {
coverage = parentPackage["cldr-data-coverage"];
}
if (coverage) {
options.srcUrlKey = coverage;
}
if (process.env.CLDR_DATA_URLS_FILTER) {
options.filterRe = process.env.CLDR_DATA_URLS_FILTER;
} else if (parentPackage && parentPackage["cldr-data-urls-filter"]) {
options.filterRe = parentPackage["cldr-data-urls-filter"];
}
if (coverage) {
options.srcUrlKey = coverage;
}
cldrDownloader(

@@ -104,0 +114,0 @@ srcUrl,

{
"name": "cldr-data",
"version": "29.0.2",
"version": "29.0.3",
"keywords": [

@@ -28,2 +28,8 @@ "unicode",

"main": "index.js",
"files": [
"DCO.md",
"index.js",
"install.js",
"urls.json"
],
"scripts": {

@@ -34,3 +40,3 @@ "install": "node install.js",

"dependencies": {
"cldr-data-downloader": "0.2.x",
"cldr-data-downloader": "0.3.x",
"glob": "5.x.x"

@@ -37,0 +43,0 @@ },

@@ -91,4 +91,49 @@ # Npm's cldr-data

#### Set Custom json file with urls or filter existing
By default, used file `urls.json` form cldr-data module, which contain
for each lovale 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)",
...
}
```
## License
MIT © [Rafael Xavier de Souza](http://rafael.xavier.blog.br)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc