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

@formatjs/intl-locale

Package Overview
Dependencies
Maintainers
3
Versions
125
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@formatjs/intl-locale - npm Package Compare versions

Comparing version

to
2.3.3

_validate_dist-esm_options.optionsvalid.d.ts

18

index.js

@@ -37,11 +37,11 @@ "use strict";

ecma402_abstract_1.invariant(intl_getcanonicallocales_1.isStructurallyValidLanguageTag(tag), 'malformed language tag', RangeError);
var language = ecma402_abstract_1.getOption(options, 'language', 'string', undefined, undefined);
var language = ecma402_abstract_1.GetOption(options, 'language', 'string', undefined, undefined);
if (language !== undefined) {
ecma402_abstract_1.invariant(intl_getcanonicallocales_1.isUnicodeLanguageSubtag(language), 'Malformed unicode_language_subtag', RangeError);
}
var script = ecma402_abstract_1.getOption(options, 'script', 'string', undefined, undefined);
var script = ecma402_abstract_1.GetOption(options, 'script', 'string', undefined, undefined);
if (script !== undefined) {
ecma402_abstract_1.invariant(intl_getcanonicallocales_1.isUnicodeScriptSubtag(script), 'Malformed unicode_script_subtag', RangeError);
}
var region = ecma402_abstract_1.getOption(options, 'region', 'string', undefined, undefined);
var region = ecma402_abstract_1.GetOption(options, 'region', 'string', undefined, undefined);
if (region !== undefined) {

@@ -244,3 +244,3 @@ ecma402_abstract_1.invariant(intl_getcanonicallocales_1.isUnicodeRegionSubtag(region), 'Malformed unicode_region_subtag', RangeError);

var opt = Object.create(null);
var calendar = ecma402_abstract_1.getOption(options, 'calendar', 'string', undefined, undefined);
var calendar = ecma402_abstract_1.GetOption(options, 'calendar', 'string', undefined, undefined);
if (calendar !== undefined) {

@@ -252,3 +252,3 @@ if (!UNICODE_TYPE_REGEX.test(calendar)) {

opt.ca = calendar;
var collation = ecma402_abstract_1.getOption(options, 'collation', 'string', undefined, undefined);
var collation = ecma402_abstract_1.GetOption(options, 'collation', 'string', undefined, undefined);
if (collation !== undefined) {

@@ -260,7 +260,7 @@ if (!UNICODE_TYPE_REGEX.test(collation)) {

opt.co = collation;
var hc = ecma402_abstract_1.getOption(options, 'hourCycle', 'string', ['h11', 'h12', 'h23', 'h24'], undefined);
var hc = ecma402_abstract_1.GetOption(options, 'hourCycle', 'string', ['h11', 'h12', 'h23', 'h24'], undefined);
opt.hc = hc;
var kf = ecma402_abstract_1.getOption(options, 'caseFirst', 'string', ['upper', 'lower', 'false'], undefined);
var kf = ecma402_abstract_1.GetOption(options, 'caseFirst', 'string', ['upper', 'lower', 'false'], undefined);
opt.kf = kf;
var _kn = ecma402_abstract_1.getOption(options, 'numeric', 'boolean', undefined, undefined);
var _kn = ecma402_abstract_1.GetOption(options, 'numeric', 'boolean', undefined, undefined);
var kn;

@@ -271,3 +271,3 @@ if (_kn !== undefined) {

opt.kn = kn;
var numberingSystem = ecma402_abstract_1.getOption(options, 'numberingSystem', 'string', undefined, undefined);
var numberingSystem = ecma402_abstract_1.GetOption(options, 'numberingSystem', 'string', undefined, undefined);
if (numberingSystem !== undefined) {

@@ -274,0 +274,0 @@ if (!UNICODE_TYPE_REGEX.test(numberingSystem)) {

{
"name": "@formatjs/intl-locale",
"version": "2.3.2",
"version": "2.3.3",
"description": "Intl.Locale polyfill",

@@ -27,4 +27,4 @@ "keywords": [

"dependencies": {
"@formatjs/ecma402-abstract": "^1.0.2",
"@formatjs/intl-getcanonicallocales": "^1.4.1",
"@formatjs/ecma402-abstract": "^1.0.3",
"@formatjs/intl-getcanonicallocales": "^1.4.2",
"@types/es-abstract": "^1.17.1",

@@ -31,0 +31,0 @@ "cldr-core": "^36.0.0",