Comparing version 25.0.6 to 25.0.7
@@ -14,5 +14,21 @@ /** | ||
var urls = require("./urls"); | ||
var parentPackage; | ||
var url; | ||
var url = urls[process.env.CLDR_COVERAGE || "core"]; | ||
try { | ||
parentPackage = require('../../package.json'); | ||
} | ||
catch(error) {} | ||
url = urls[process.env.CLDR_COVERAGE || "core"]; | ||
if (parentPackage) { | ||
if (parentPackage["cldr-data-coverage"] && parentPackage.dependencies["cldr-data"]) { | ||
if (!/^full|core$/.test(parentPackage["cldr-data-coverage"])) { | ||
throw new TypeError("Your `cldr-data-coverage setting must have the value \"core\" or \"full\"."); | ||
} | ||
url = urls[parentPackage["cldr-data-coverage"]]; | ||
} | ||
} | ||
if (process.env.CLDR_URL) { | ||
@@ -19,0 +35,0 @@ url = url.replace( |
{ | ||
"name": "cldr-data", | ||
"version": "25.0.6", | ||
"version": "25.0.7", | ||
"keywords": [ | ||
@@ -5,0 +5,0 @@ "unicode", |
@@ -57,6 +57,6 @@ # Npm's cldr-data | ||
By default, the locale coverage installed is `core`, which Unicode defines as | ||
the top tier languages and is equivalent to the `json.zip` content. If you need | ||
full locale coverage, use `CLDR_COVERAGE` environment variable to modify the | ||
installation behavior. For example: | ||
the top tier languages and is equivalent to the `json.zip` content. There exists two solutions to get the full coverage: either by setting the environmental variable `CLDR_COVERAGE` to `full` or define the coverage in your `package.json`. | ||
#### Environmental variable | ||
In this example we are installing `cldr-data` by setting the `CLDR_COVERAGE` to `full`: | ||
``` | ||
@@ -66,4 +66,14 @@ $ CLDR_COVERAGE=full npm install | ||
#### package.json | ||
Define your coverage by setting the property `cldr-data-coverage` in your `package.json: | ||
``` | ||
{ | ||
... | ||
"cldr-data-coverage": "full", | ||
... | ||
} | ||
``` | ||
## 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
9228
111
78