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

intl-messageformat

Package Overview
Dependencies
Maintainers
12
Versions
271
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

intl-messageformat - npm Package Compare versions

Comparing version 9.9.1 to 9.9.2

43

intl-messageformat.esm.js
var __defProp = Object.defineProperty;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {enumerable: true, configurable: true, writable: true, value}) : obj[key] = value;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __require = typeof require !== "undefined" ? require : (x) => {
throw new Error('Dynamic require of "' + x + '" is not supported');
};
var __publicField = (obj, key, value) => {

@@ -234,3 +237,3 @@ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);

}
tokens.push({stem, options});
tokens.push({ stem, options });
}

@@ -382,3 +385,3 @@ return tokens;

case "scientific":
result = __assign(__assign(__assign({}, result), {notation: "scientific"}), token.options.reduce(function(all, opt) {
result = __assign(__assign(__assign({}, result), { notation: "scientific" }), token.options.reduce(function(all, opt) {
return __assign(__assign({}, all), parseNotationOptions(opt));

@@ -388,3 +391,3 @@ }, {}));

case "engineering":
result = __assign(__assign(__assign({}, result), {notation: "engineering"}), token.options.reduce(function(all, opt) {
result = __assign(__assign(__assign({}, result), { notation: "engineering" }), token.options.reduce(function(all, opt) {
return __assign(__assign({}, all), parseNotationOptions(opt));

@@ -478,3 +481,3 @@ }, {}));

function createLocation(start, end) {
return {start, end};
return { start, end };
}

@@ -583,3 +586,3 @@ var hasNativeStartsWith = !!String.prototype.startsWith;

this.message = message;
this.position = {offset: 0, line: 1, column: 1};
this.position = { offset: 0, line: 1, column: 1 };
this.ignoreTag = !!options.ignoreTag;

@@ -634,3 +637,3 @@ this.requiresOtherClause = !!options.requiresOtherClause;

}
return {val: elements, err: null};
return { val: elements, err: null };
};

@@ -718,3 +721,3 @@ Parser2.prototype.parseTag = function(nestingLevel, parentArgType) {

return {
val: {type: TYPE.literal, value, location},
val: { type: TYPE.literal, value, location },
err: null

@@ -835,3 +838,3 @@ };

var location = createLocation(startingPosition, endPosition);
return {value, location};
return { value, location };
};

@@ -863,3 +866,3 @@ Parser2.prototype.parseArgumentOptions = function(nestingLevel, expectingCloseTag, value, openingBracePosition) {

var styleLocation = createLocation(styleStartPosition, this.clonePosition());
styleAndLocation = {style, styleLocation};
styleAndLocation = { style, styleLocation };
}

@@ -879,3 +882,3 @@ var argCloseResult = this.tryParseArgumentClose(openingBracePosition);

return {
val: {type: TYPE.number, value, location: location_1, style: result.val},
val: { type: TYPE.number, value, location: location_1, style: result.val },
err: null

@@ -895,3 +898,3 @@ };

return {
val: {type, value, location: location_1, style},
val: { type, value, location: location_1, style },
err: null

@@ -977,3 +980,3 @@ };

this.bump();
return {val: true, err: null};
return { val: true, err: null };
};

@@ -1094,3 +1097,3 @@ Parser2.prototype.parseSimpleArgStyleIfPossible = function() {

}
return {val: options, err: null};
return { val: options, err: null };
};

@@ -1124,3 +1127,3 @@ Parser2.prototype.tryParseDecimalInteger = function(expectNumberError, invalidNumberError) {

}
return {val: decimal, err: null};
return { val: decimal, err: null };
};

@@ -1268,3 +1271,3 @@ Parser2.prototype.offset = function() {

}
opts = __assign({shouldParseSkeletons: true, requiresOtherClause: true}, opts);
opts = __assign({ shouldParseSkeletons: true, requiresOtherClause: true }, opts);
var result = new Parser(message, opts).parse();

@@ -1435,3 +1438,3 @@ if (result.err) {

}
const {value: varName} = el;
const { value: varName } = el;
if (!(values && varName in values)) {

@@ -1479,3 +1482,3 @@ throw new MissingValueError(varName, originalMessage);

if (isTagElement(el)) {
const {children, value: value2} = el;
const { children, value: value2 } = el;
const formatFn = values[value2];

@@ -1513,3 +1516,3 @@ if (!isFormatXMLElementFn(formatFn)) {

}
const rule = formatters.getPluralRules(locales, {type: el.pluralType}).select(value - (el.offset || 0));
const rule = formatters.getPluralRules(locales, { type: el.pluralType }).select(value - (el.offset || 0));
opt = el.options[rule] || el.options.other;

@@ -1551,3 +1554,3 @@ }

return all;
}, {...defaultConfig});
}, { ...defaultConfig });
}

@@ -1554,0 +1557,0 @@ function createFastMemoizeCache(store) {

{
"name": "intl-messageformat",
"version": "9.9.1",
"version": "9.9.2",
"description": "Formats ICU Message strings with number, date, plural, and select placeholders to create localized messages.",

@@ -35,3 +35,3 @@ "keywords": [

"@formatjs/fast-memoize": "1.2.0",
"@formatjs/icu-messageformat-parser": "2.0.11",
"@formatjs/icu-messageformat-parser": "2.0.12",
"tslib": "^2.1.0"

@@ -38,0 +38,0 @@ },

Sorry, the diff of this file is too big to display

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