Socket
Socket
Sign inDemoInstall

intl-messageformat

Package Overview
Dependencies
Maintainers
12
Versions
263
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.13.0 to 10.0.1

4

lib/src/core.d.ts

@@ -16,3 +16,3 @@ import { parse, MessageFormatElement } from '@formatjs/icu-messageformat-parser';

private readonly locales;
private readonly resolvedLocale;
private readonly resolvedLocale?;
private readonly formatters;

@@ -31,3 +31,3 @@ private readonly formats;

static get defaultLocale(): string;
static resolveLocale: (locales: string | string[]) => Intl.Locale;
static resolveLocale: (locales: string | string[]) => Intl.Locale | undefined;
static __parse: typeof parse | undefined;

@@ -34,0 +34,0 @@ static formats: Formats;

@@ -119,5 +119,9 @@ /*

};
this.resolvedOptions = function () { return ({
locale: _this.resolvedLocale.toString(),
}); };
this.resolvedOptions = function () {
var _a;
return ({
locale: ((_a = _this.resolvedLocale) === null || _a === void 0 ? void 0 : _a.toString()) ||
Intl.NumberFormat.supportedLocalesOf(_this.locales)[0],
});
};
this.getAst = function () { return _this.ast; };

@@ -163,2 +167,5 @@ // Defined first because it's used to build the format pattern.

IntlMessageFormat.resolveLocale = function (locales) {
if (typeof Intl.Locale === 'undefined') {
return;
}
var supportedLocales = Intl.NumberFormat.supportedLocalesOf(locales);

@@ -165,0 +172,0 @@ if (supportedLocales.length > 0) {

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

@@ -34,6 +34,6 @@ "keywords": [

"dependencies": {
"@formatjs/ecma402-abstract": "1.11.4",
"@formatjs/fast-memoize": "1.2.1",
"@formatjs/icu-messageformat-parser": "2.1.0",
"tslib": "^2.1.0"
"@formatjs/ecma402-abstract": "1.11.6",
"@formatjs/fast-memoize": "1.2.3",
"@formatjs/icu-messageformat-parser": "2.1.2",
"tslib": "2.4.0"
},

@@ -40,0 +40,0 @@ "sideEffects": false,

@@ -16,3 +16,3 @@ import { parse, MessageFormatElement } from '@formatjs/icu-messageformat-parser';

private readonly locales;
private readonly resolvedLocale;
private readonly resolvedLocale?;
private readonly formatters;

@@ -31,3 +31,3 @@ private readonly formats;

static get defaultLocale(): string;
static resolveLocale: (locales: string | string[]) => Intl.Locale;
static resolveLocale: (locales: string | string[]) => Intl.Locale | undefined;
static __parse: typeof parse | undefined;

@@ -34,0 +34,0 @@ static formats: Formats;

@@ -122,5 +122,9 @@ "use strict";

};
this.resolvedOptions = function () { return ({
locale: _this.resolvedLocale.toString(),
}); };
this.resolvedOptions = function () {
var _a;
return ({
locale: ((_a = _this.resolvedLocale) === null || _a === void 0 ? void 0 : _a.toString()) ||
Intl.NumberFormat.supportedLocalesOf(_this.locales)[0],
});
};
this.getAst = function () { return _this.ast; };

@@ -166,2 +170,5 @@ // Defined first because it's used to build the format pattern.

IntlMessageFormat.resolveLocale = function (locales) {
if (typeof Intl.Locale === 'undefined') {
return;
}
var supportedLocales = Intl.NumberFormat.supportedLocalesOf(locales);

@@ -168,0 +175,0 @@ if (supportedLocales.length > 0) {

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

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

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