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 25.0.13 to 25.0.14

test/index.js

35

index.js

@@ -11,20 +11,6 @@ /**

var MAIN_FILES = ["ca-buddhist", "ca-chinese", "ca-coptic", "ca-dangi",
"ca-ethiopic-amete-alem", "ca-ethiopic", "ca-generic", "ca-gregorian",
"ca-hebrew", "ca-indian", "ca-islamic-civil", "ca-islamic", "ca-islamic-rgsa",
"ca-islamic-tbla", "ca-islamic-umalqura", "ca-japanese", "ca-persian", "ca-roc",
"characters", "currencies", "dateFields", "delimiters", "languages", "layout",
"listPatterns", "localeDisplayNames", "measurementSystemNames", "numbers",
"posix", "scripts", "territories", "timeZoneNames", "units", "variants"
];
var SUPPLEMENTAL_FILES = ["aliases", "calendarData", "calendarPreferenceData",
"characterFallbacks", "codeMappings", "currencyData", "gender",
"languageData", "languageMatching", "likelySubtags", "measurementData",
"metaZones", "numberingSystems", "ordinals", "parentLocales", "plurals",
"postalCodeData", "primaryZones", "references", "telephoneCodeData",
"territoryContainment", "territoryInfo", "timeData", "weekData",
"windowsZones"
];
var JSON_EXTENSION = /^(.*)\.json$/;
var assert = require("assert");
var _fs = require("fs");
var _path = require("path");

@@ -50,2 +36,12 @@

function jsonFiles(dirName) {
var fileList = _fs.readdirSync(dirName);
return fileList.reduce(function(sum, file) {
if (JSON_EXTENSION.test(file)) {
return sum.concat(file.match(JSON_EXTENSION)[1]);
}
}, []);
}
function cldrData(path/*, ...*/) {

@@ -66,3 +62,4 @@ assert(typeof path === "string", "must include path (e.g., " +

return locales.reduce(function(sum, locale) {
MAIN_FILES.forEach(function(mainFile) {
var mainFiles = jsonFiles(_path.join("main", locale));
mainFiles.forEach(function(mainFile) {
sum.push(_path.join("main", locale, mainFile));

@@ -75,3 +72,5 @@ });

function supplementalPaths() {
return SUPPLEMENTAL_FILES.map(function(supplementalFile) {
var supplementalFiles = jsonFiles("supplemental");
return supplementalFiles.map(function(supplementalFile) {
return _path.join("supplemental", supplementalFile);

@@ -78,0 +77,0 @@ });

{
"name": "cldr-data",
"version": "25.0.13",
"version": "25.0.14",
"keywords": [

@@ -30,3 +30,3 @@ "unicode",

"install": "node install.js",
"test": "grunt"
"test": "grunt && node test/index.js"
},

@@ -33,0 +33,0 @@ "dependencies": {

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