Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@formatjs/ecma402-abstract

Package Overview
Dependencies
Maintainers
3
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@formatjs/ecma402-abstract - npm Package Compare versions

Comparing version 1.2.2 to 1.2.3

2

_validate_dist-base_options.optionsvalid.d.ts
// /home/longlho/.cache/bazel/_bazel_longlho/576c18efaac10246ec115c72af79fca6/sandbox/linux-sandbox/2759/execroot/formatjs/node_modules/@bazel/typescript/internal/ts_project_options_validator.js checked attributes for //packages/ecma402-abstract:dist-base
// /home/longlho/.cache/bazel/_bazel_longlho/576c18efaac10246ec115c72af79fca6/sandbox/linux-sandbox/184/execroot/formatjs/node_modules/@bazel/typescript/internal/ts_project_options_validator.js checked attributes for //packages/ecma402-abstract:dist-base
// composite: false

@@ -4,0 +4,0 @@ // declaration: true

// /home/longlho/.cache/bazel/_bazel_longlho/576c18efaac10246ec115c72af79fca6/sandbox/linux-sandbox/2765/execroot/formatjs/node_modules/@bazel/typescript/internal/ts_project_options_validator.js checked attributes for //packages/ecma402-abstract:dist-esm
// /home/longlho/.cache/bazel/_bazel_longlho/576c18efaac10246ec115c72af79fca6/sandbox/linux-sandbox/189/execroot/formatjs/node_modules/@bazel/typescript/internal/ts_project_options_validator.js checked attributes for //packages/ecma402-abstract:dist-esm
// composite: false

@@ -4,0 +4,0 @@ // declaration: true

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.invariant = exports.isMissingLocaleDataError = exports.unpackData = exports.getLocaleHierarchy = exports.defineProperty = exports.getMagnitude = exports.setMultiInternalSlots = exports.setInternalSlot = exports.isLiteralPart = exports.getMultiInternalSlots = exports.getInternalSlot = exports.parseDateTimeSkeleton = exports.DATE_TIME_PROPS = exports._formatToParts = exports.BestFitFormatMatcher = void 0;
var tslib_1 = require("tslib");
var BestFitFormatMatcher_1 = require("./src/DateTimeFormat/BestFitFormatMatcher");
Object.defineProperty(exports, "BestFitFormatMatcher", { enumerable: true, get: function () { return BestFitFormatMatcher_1.BestFitFormatMatcher; } });
__exportStar(require("./src/CanonicalizeLocaleList"), exports);
__exportStar(require("./src/CanonicalizeTimeZoneName"), exports);
__exportStar(require("./src/DateTimeFormat/BasicFormatMatcher"), exports);
__exportStar(require("./src/DateTimeFormat/DateTimeStyleFormat"), exports);
__exportStar(require("./src/DateTimeFormat/FormatDateTime"), exports);
__exportStar(require("./src/DateTimeFormat/FormatDateTimeToParts"), exports);
__exportStar(require("./src/DateTimeFormat/InitializeDateTimeFormat"), exports);
__exportStar(require("./src/DateTimeFormat/PartitionDateTimePattern"), exports);
__exportStar(require("./src/DateTimeFormat/ToDateTimeOptions"), exports);
__exportStar(require("./src/DisplayNames/CanonicalCodeForDisplayNames"), exports);
__exportStar(require("./src/GetNumberOption"), exports);
__exportStar(require("./src/GetOption"), exports);
__exportStar(require("./src/IsSanctionedSimpleUnitIdentifier"), exports);
__exportStar(require("./src/IsValidTimeZoneName"), exports);
__exportStar(require("./src/IsWellFormedCurrencyCode"), exports);
__exportStar(require("./src/IsWellFormedUnitIdentifier"), exports);
__exportStar(require("./src/NumberFormat/ComputeExponent"), exports);
__exportStar(require("./src/NumberFormat/ComputeExponentForMagnitude"), exports);
__exportStar(require("./src/NumberFormat/CurrencyDigits"), exports);
__exportStar(require("./src/NumberFormat/FormatNumericToParts"), exports);
__exportStar(require("./src/NumberFormat/FormatNumericToString"), exports);
__exportStar(require("./src/NumberFormat/InitializeNumberFormat"), exports);
__exportStar(require("./src/NumberFormat/PartitionNumberPattern"), exports);
__exportStar(require("./src/NumberFormat/SetNumberFormatDigitOptions"), exports);
__exportStar(require("./src/NumberFormat/SetNumberFormatUnitOptions"), exports);
__exportStar(require("./src/NumberFormat/ToRawFixed"), exports);
__exportStar(require("./src/NumberFormat/ToRawPrecision"), exports);
__exportStar(require("./src/PartitionPattern"), exports);
__exportStar(require("./src/PluralRules/GetOperands"), exports);
__exportStar(require("./src/PluralRules/InitializePluralRules"), exports);
__exportStar(require("./src/PluralRules/ResolvePlural"), exports);
__exportStar(require("./src/RelativeTimeFormat/FormatRelativeTime"), exports);
__exportStar(require("./src/RelativeTimeFormat/FormatRelativeTimeToParts"), exports);
__exportStar(require("./src/RelativeTimeFormat/InitializeRelativeTimeFormat"), exports);
__exportStar(require("./src/RelativeTimeFormat/MakePartsList"), exports);
__exportStar(require("./src/RelativeTimeFormat/PartitionRelativeTimePattern"), exports);
__exportStar(require("./src/RelativeTimeFormat/SingularRelativeTimeUnit"), exports);
__exportStar(require("./src/ResolveLocale"), exports);
__exportStar(require("./src/SupportedLocales"), exports);
tslib_1.__exportStar(require("./src/CanonicalizeLocaleList"), exports);
tslib_1.__exportStar(require("./src/CanonicalizeTimeZoneName"), exports);
tslib_1.__exportStar(require("./src/DateTimeFormat/BasicFormatMatcher"), exports);
tslib_1.__exportStar(require("./src/DateTimeFormat/DateTimeStyleFormat"), exports);
tslib_1.__exportStar(require("./src/DateTimeFormat/FormatDateTime"), exports);
tslib_1.__exportStar(require("./src/DateTimeFormat/FormatDateTimeToParts"), exports);
tslib_1.__exportStar(require("./src/DateTimeFormat/InitializeDateTimeFormat"), exports);
tslib_1.__exportStar(require("./src/DateTimeFormat/PartitionDateTimePattern"), exports);
tslib_1.__exportStar(require("./src/DateTimeFormat/ToDateTimeOptions"), exports);
tslib_1.__exportStar(require("./src/DisplayNames/CanonicalCodeForDisplayNames"), exports);
tslib_1.__exportStar(require("./src/GetNumberOption"), exports);
tslib_1.__exportStar(require("./src/GetOption"), exports);
tslib_1.__exportStar(require("./src/IsSanctionedSimpleUnitIdentifier"), exports);
tslib_1.__exportStar(require("./src/IsValidTimeZoneName"), exports);
tslib_1.__exportStar(require("./src/IsWellFormedCurrencyCode"), exports);
tslib_1.__exportStar(require("./src/IsWellFormedUnitIdentifier"), exports);
tslib_1.__exportStar(require("./src/NumberFormat/ComputeExponent"), exports);
tslib_1.__exportStar(require("./src/NumberFormat/ComputeExponentForMagnitude"), exports);
tslib_1.__exportStar(require("./src/NumberFormat/CurrencyDigits"), exports);
tslib_1.__exportStar(require("./src/NumberFormat/FormatNumericToParts"), exports);
tslib_1.__exportStar(require("./src/NumberFormat/FormatNumericToString"), exports);
tslib_1.__exportStar(require("./src/NumberFormat/InitializeNumberFormat"), exports);
tslib_1.__exportStar(require("./src/NumberFormat/PartitionNumberPattern"), exports);
tslib_1.__exportStar(require("./src/NumberFormat/SetNumberFormatDigitOptions"), exports);
tslib_1.__exportStar(require("./src/NumberFormat/SetNumberFormatUnitOptions"), exports);
tslib_1.__exportStar(require("./src/NumberFormat/ToRawFixed"), exports);
tslib_1.__exportStar(require("./src/NumberFormat/ToRawPrecision"), exports);
tslib_1.__exportStar(require("./src/PartitionPattern"), exports);
tslib_1.__exportStar(require("./src/PluralRules/GetOperands"), exports);
tslib_1.__exportStar(require("./src/PluralRules/InitializePluralRules"), exports);
tslib_1.__exportStar(require("./src/PluralRules/ResolvePlural"), exports);
tslib_1.__exportStar(require("./src/RelativeTimeFormat/FormatRelativeTime"), exports);
tslib_1.__exportStar(require("./src/RelativeTimeFormat/FormatRelativeTimeToParts"), exports);
tslib_1.__exportStar(require("./src/RelativeTimeFormat/InitializeRelativeTimeFormat"), exports);
tslib_1.__exportStar(require("./src/RelativeTimeFormat/MakePartsList"), exports);
tslib_1.__exportStar(require("./src/RelativeTimeFormat/PartitionRelativeTimePattern"), exports);
tslib_1.__exportStar(require("./src/RelativeTimeFormat/SingularRelativeTimeUnit"), exports);
tslib_1.__exportStar(require("./src/ResolveLocale"), exports);
tslib_1.__exportStar(require("./src/SupportedLocales"), exports);
var format_to_parts_1 = require("./src/NumberFormat/format_to_parts");
Object.defineProperty(exports, "_formatToParts", { enumerable: true, get: function () { return __importDefault(format_to_parts_1).default; } });
Object.defineProperty(exports, "_formatToParts", { enumerable: true, get: function () { return tslib_1.__importDefault(format_to_parts_1).default; } });
var utils_1 = require("./src/DateTimeFormat/utils");

@@ -76,10 +64,10 @@ Object.defineProperty(exports, "DATE_TIME_PROPS", { enumerable: true, get: function () { return utils_1.DATE_TIME_PROPS; } });

Object.defineProperty(exports, "isMissingLocaleDataError", { enumerable: true, get: function () { return data_1.isMissingLocaleDataError; } });
__exportStar(require("./types/relative-time"), exports);
__exportStar(require("./types/date-time"), exports);
__exportStar(require("./types/list"), exports);
__exportStar(require("./types/plural-rules"), exports);
__exportStar(require("./types/number"), exports);
__exportStar(require("./types/displaynames"), exports);
tslib_1.__exportStar(require("./types/relative-time"), exports);
tslib_1.__exportStar(require("./types/date-time"), exports);
tslib_1.__exportStar(require("./types/list"), exports);
tslib_1.__exportStar(require("./types/plural-rules"), exports);
tslib_1.__exportStar(require("./types/number"), exports);
tslib_1.__exportStar(require("./types/displaynames"), exports);
var utils_3 = require("./src/utils");
Object.defineProperty(exports, "invariant", { enumerable: true, get: function () { return utils_3.invariant; } });
__exportStar(require("./262"), exports);
tslib_1.__exportStar(require("./262"), exports);

@@ -1,25 +0,2 @@

var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
import { __assign, __extends } from "tslib";
export function getLocaleHierarchy(locale) {

@@ -26,0 +3,0 @@ var results = [locale];

@@ -1,12 +0,2 @@

var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
import { __assign } from "tslib";
import { invariant } from '../utils';

@@ -13,0 +3,0 @@ import { DATE_TIME_PROPS, additionPenalty, removalPenalty, longMorePenalty, shortMorePenalty, shortLessPenalty, longLessPenalty, } from './utils';

@@ -1,12 +0,2 @@

var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
import { __assign } from "tslib";
import { invariant } from '../utils';

@@ -13,0 +3,0 @@ import { DATE_TIME_PROPS, removalPenalty, additionPenalty, differentNumericTypePenalty, longMorePenalty, shortMorePenalty, shortLessPenalty, longLessPenalty, } from './utils';

@@ -87,2 +87,6 @@ import { CanonicalizeLocaleList } from '../CanonicalizeLocaleList';

var formats = dataLocaleData.formats[calendar];
// UNSPECCED: IMPLEMENTATION DETAILS
if (!formats) {
throw new RangeError("Calendar \"" + calendar + "\" is not supported. Try setting \"calendar\" to 1 of the following: " + Object.keys(dataLocaleData.formats).join(', '));
}
matcher = GetOption(options, 'formatMatcher', 'string', ['basic', 'best fit'], 'best fit');

@@ -89,0 +93,0 @@ var dateStyle = GetOption(options, 'dateStyle', 'string', ['full', 'long', 'medium', 'short'], undefined);

{
"name": "@formatjs/ecma402-abstract",
"version": "1.2.2",
"version": "1.2.3",
"description": "A collection of implementation for ECMAScript abstract operations",

@@ -16,2 +16,5 @@ "keywords": [

],
"dependencies": {
"tslib": "^2.0.1"
},
"author": "Long Ho <holevietlong@gmail.com",

@@ -18,0 +21,0 @@ "bugs": {

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.unpackData = exports.isMissingLocaleDataError = exports.getLocaleHierarchy = void 0;
var tslib_1 = require("tslib");
function getLocaleHierarchy(locale) {

@@ -38,3 +15,3 @@ var results = [locale];

var MissingLocaleDataError = /** @class */ (function (_super) {
__extends(MissingLocaleDataError, _super);
tslib_1.__extends(MissingLocaleDataError, _super);
function MissingLocaleDataError() {

@@ -54,3 +31,3 @@ var _this = _super !== null && _super.apply(this, arguments) || this;

reducer) {
if (reducer === void 0) { reducer = function (all, d) { return (__assign(__assign({}, all), d)); }; }
if (reducer === void 0) { reducer = function (all, d) { return (tslib_1.__assign(tslib_1.__assign({}, all), d)); }; }
var localeHierarchy = getLocaleHierarchy(locale);

@@ -57,0 +34,0 @@ var dataToMerge = localeHierarchy

"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.BasicFormatMatcher = void 0;
var tslib_1 = require("tslib");
var utils_1 = require("../utils");

@@ -63,4 +53,4 @@ var utils_2 = require("./utils");

}
return __assign({}, bestFormat);
return tslib_1.__assign({}, bestFormat);
}
exports.BasicFormatMatcher = BasicFormatMatcher;
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.BestFitFormatMatcher = exports.bestFitFormatMatcherScore = void 0;
var tslib_1 = require("tslib");
var utils_1 = require("../utils");

@@ -93,3 +83,3 @@ var utils_2 = require("./utils");

}
var skeletonFormat = __assign({}, bestFormat);
var skeletonFormat = tslib_1.__assign({}, bestFormat);
var patternFormat = skeleton_1.parseDateTimeSkeleton(bestFormat.rawPattern);

@@ -96,0 +86,0 @@ // Kinda following https://github.com/unicode-org/icu/blob/dd50e38f459d84e9bf1b0c618be8483d318458ad/icu4j/main/classes/core/src/com/ibm/icu/text/DateTimePatternGenerator.java

@@ -90,2 +90,6 @@ "use strict";

var formats = dataLocaleData.formats[calendar];
// UNSPECCED: IMPLEMENTATION DETAILS
if (!formats) {
throw new RangeError("Calendar \"" + calendar + "\" is not supported. Try setting \"calendar\" to 1 of the following: " + Object.keys(dataLocaleData.formats).join(', '));
}
matcher = GetOption_1.GetOption(options, 'formatMatcher', 'string', ['basic', 'best fit'], 'best fit');

@@ -92,0 +96,0 @@ var dateStyle = GetOption_1.GetOption(options, 'dateStyle', 'string', ['full', 'long', 'medium', 'short'], undefined);

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var ToRawFixed_1 = require("./ToRawFixed");
var digitMapping = __importStar(require("./digit-mapping.json"));
var digitMapping = tslib_1.__importStar(require("./digit-mapping.json"));
// This is from: unicode-12.1.0/General_Category/Symbol/regex.js

@@ -25,0 +7,0 @@ // IE11 does not support unicode flag, otherwise this is just /\p{S}/u.

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.PartitionNumberPattern = void 0;
var tslib_1 = require("tslib");
var FormatNumericToString_1 = require("./FormatNumericToString");
var _262_1 = require("../../262");
var ComputeExponent_1 = require("./ComputeExponent");
var format_to_parts_1 = __importDefault(require("./format_to_parts"));
var format_to_parts_1 = tslib_1.__importDefault(require("./format_to_parts"));
/**

@@ -12,0 +10,0 @@ * https://tc39.es/ecma402/#sec-formatnumberstring

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./types/relative-time"), exports);
__exportStar(require("./types/list"), exports);
__exportStar(require("./types/plural-rules"), exports);
__exportStar(require("./types/number"), exports);
__exportStar(require("./types/displaynames"), exports);
var tslib_1 = require("tslib");
tslib_1.__exportStar(require("./types/relative-time"), exports);
tslib_1.__exportStar(require("./types/list"), exports);
tslib_1.__exportStar(require("./types/plural-rules"), exports);
tslib_1.__exportStar(require("./types/number"), exports);
tslib_1.__exportStar(require("./types/displaynames"), exports);

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