New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@phensley/cldr-compiler

Package Overview
Dependencies
Maintainers
1
Versions
242
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@phensley/cldr-compiler - npm Package Compare versions

Comparing version 0.2.10 to 0.2.11

lib/cli/generator/code/systems.d.ts

43

lib/cldr.js

@@ -292,11 +292,44 @@ "use strict";

};
var numberSystemKeys = ['currencyFormats', 'decimalFormats', 'percentFormats', 'symbols'];
/**
* Restructure the formats by numbering system.
*/
var numberSystemInfo = function (o) {
var r = {};
// Get unique numbering system keys in this locale
var systems = new Set();
Object.keys(o).forEach(function (k) {
if (k.startsWith('decimalFormats-numberSystem')) {
var system = k.split('-')[2];
systems.add(system);
}
});
// Group formats by numbering system
systems.forEach(function (name) {
var system = {};
numberSystemKeys.forEach(function (k) {
system[k] = o[k + "-numberSystem-" + name];
});
r[name] = system;
});
return r;
};
var numberSystems = function (o) {
var def = o.defaultNumberingSystem;
var other = o.otherNumberingSystems;
var native = other.native || def;
return {
default: def,
native: native,
finance: other.finance || def,
traditional: other.traditional || native
};
};
/**
* Number and currency formatting data.
*/
var Numbers = {
currencyFormats: get(['numbers', 'currencyFormats-numberSystem-latn']),
decimalFormats: get(['numbers', 'decimalFormats-numberSystem-latn']),
numberSystem: get(['numbers', numberSystemInfo]),
numberSystems: get(['numbers', numberSystems]),
minimumGroupingDigits: get(['numbers', 'minimumGroupingDigits']),
percentFormats: get(['numbers', 'percentFormats-numberSystem-latn']),
symbols: get(['numbers', 'symbols-numberSystem-latn'])
};

@@ -385,3 +418,3 @@ /**

};
return __assign({ Aliases: access(Aliases, 'aliases'), MetaZones: access(MetaZones, 'metaZones'), WeekData: access(WeekData, 'weekData') }, access({ Cardinals: get(['plurals-type-cardinal']) }, 'plurals'), access({ CurrencyFractions: get(['currencyData', 'fractions']) }, 'currencyData'), access({ Ordinals: get(['plurals-type-ordinal']) }, 'ordinals'), access({ LikelySubtags: get(['likelySubtags']) }, 'likelySubtags'), access({ TerritoryContainment: get(['territoryContainment']) }, 'territoryContainment'));
return __assign({ Aliases: access(Aliases, 'aliases'), MetaZones: access(MetaZones, 'metaZones'), WeekData: access(WeekData, 'weekData') }, access({ Cardinals: get(['plurals-type-cardinal']) }, 'plurals'), access({ CurrencyFractions: get(['currencyData', 'fractions']) }, 'currencyData'), access({ Ordinals: get(['plurals-type-ordinal']) }, 'ordinals'), access({ LikelySubtags: get(['likelySubtags']) }, 'likelySubtags'), access({ NumberingSystems: get(['numberingSystems']) }, 'numberingSystems'), access({ TerritoryContainment: get(['territoryContainment']) }, 'territoryContainment'));
};

@@ -388,0 +421,0 @@ /**

@@ -12,2 +12,3 @@ "use strict";

var subtags_1 = require("./subtags");
var systems_1 = require("./systems");
var territories_1 = require("./territories");

@@ -25,2 +26,3 @@ var units_1 = require("./units");

subtags: subtags_1.getSubtags,
systems: systems_1.getSystems,
territories: territories_1.getTerritories,

@@ -31,2 +33,3 @@ units: units_1.getUnits,

};
// Names of pre-processed data files
var DATA_FILES = [

@@ -33,0 +36,0 @@ 'aliases', 'currencyinfo', 'matching', 'metazones', 'plurals', 'subtags', 'symbols',

5

lib/cli/generator/schema/index.js

@@ -66,3 +66,4 @@ "use strict";

Object.keys(main).forEach(function (key) {
var dst = sections[key] || {};
var prefix = "Main." + key;
var dst = sections[prefix] || {};
var src = main[key];

@@ -74,3 +75,3 @@ if (!src) {

mergeKeyCounts(dst, counts);
sections["Main." + key] = dst;
sections[prefix] = dst;
});

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

{
"name": "@phensley/cldr-compiler",
"version": "0.2.10",
"version": "0.2.11",
"description": "Compiler for @phensley/cldr",

@@ -33,4 +33,4 @@ "main": "lib/index.js",

"dependencies": {
"@phensley/cldr-core": "^0.2.10",
"@phensley/cldr-schema": "^0.2.10",
"@phensley/cldr-core": "^0.2.11",
"@phensley/cldr-schema": "^0.2.11",
"@types/node": "8.5.8",

@@ -37,0 +37,0 @@ "@types/prettier": "^1.9.0",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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