cldr-data-downloader
Advanced tools
Comparing version 0.2.5 to 0.3.0
@@ -32,2 +32,4 @@ /** | ||
" -f, --force # Force to re-download and to re-unpack.", | ||
" --filter # Regexp URL mask: '(core|numbers)' etc. Useful", | ||
" # when input is for external .json config", | ||
"" | ||
@@ -46,2 +48,3 @@ ]; | ||
"coverage": String, | ||
filter: String, | ||
output: path, | ||
@@ -71,2 +74,3 @@ force: Boolean | ||
options.force = opts.force; | ||
options.filterRe = opts.filter; | ||
options.srcUrlKey = opts["src-url-key"] || opts.coverage; | ||
@@ -73,0 +77,0 @@ |
12
index.js
@@ -71,2 +71,14 @@ /** | ||
var srcUrls = alwaysArray(srcUrl); | ||
if (options.filterRe) { | ||
var filterRe = options.filterRe; | ||
if (typeof filterRe === 'string') { | ||
filterRe = new RegExp(filterRe); | ||
} | ||
srcUrls = srcUrls.filter(function(url) { | ||
return filterRe.test(url); | ||
}); | ||
} | ||
return Q.all(srcUrls.map(function(srcUrl) { | ||
@@ -73,0 +85,0 @@ return download({ |
{ | ||
"name": "cldr-data-downloader", | ||
"version": "0.2.5", | ||
"version": "0.3.0", | ||
"keywords": [ | ||
@@ -5,0 +5,0 @@ "unicode", |
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
20259
501