Socket
Socket
Sign inDemoInstall

@internationalized/string

Package Overview
Dependencies
2
Maintainers
2
Versions
381
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.2.3-nightly.4624 to 3.2.3

14

dist/LocalizedStringDictionary.main.js

@@ -17,4 +17,4 @@

* governing permissions and limitations under the License.
*/ const $f80be5fd4d03dda9$var$localeSymbol = Symbol.for("react-aria.i18n.locale");
const $f80be5fd4d03dda9$var$stringsSymbol = Symbol.for("react-aria.i18n.strings");
*/ const $f80be5fd4d03dda9$var$localeSymbol = Symbol.for('react-aria.i18n.locale');
const $f80be5fd4d03dda9$var$stringsSymbol = Symbol.for('react-aria.i18n.strings');
let $f80be5fd4d03dda9$var$cachedGlobalStrings = undefined;

@@ -37,3 +37,3 @@ class $f80be5fd4d03dda9$export$c17fa47878dc55b6 {

static getGlobalDictionaryForPackage(packageName) {
if (typeof window === "undefined") return null;
if (typeof window === 'undefined') return null;
let locale = window[$f80be5fd4d03dda9$var$localeSymbol];

@@ -52,3 +52,3 @@ if ($f80be5fd4d03dda9$var$cachedGlobalStrings === undefined) {

}
constructor(messages, defaultLocale = "en-US"){
constructor(messages, defaultLocale = 'en-US'){
// Clone messages so we don't modify the original object.

@@ -60,3 +60,3 @@ // Filter out entries with falsy values which may have been caused by applying optimize-locales-plugin.

}
function $f80be5fd4d03dda9$var$getStringsForLocale(locale, strings, defaultLocale = "en-US") {
function $f80be5fd4d03dda9$var$getStringsForLocale(locale, strings, defaultLocale = 'en-US') {
// If there is an exact match, use it.

@@ -72,3 +72,3 @@ if (strings[locale]) return strings[locale];

for(let key in strings){
if (key.startsWith(language + "-")) return strings[key];
if (key.startsWith(language + '-')) return strings[key];
}

@@ -82,3 +82,3 @@ // Nothing close, use english.

return new Intl.Locale(locale).language;
return locale.split("-")[0];
return locale.split('-')[0];
}

@@ -85,0 +85,0 @@

@@ -11,4 +11,4 @@ /*

* governing permissions and limitations under the License.
*/ const $5b160d28a433310d$var$localeSymbol = Symbol.for("react-aria.i18n.locale");
const $5b160d28a433310d$var$stringsSymbol = Symbol.for("react-aria.i18n.strings");
*/ const $5b160d28a433310d$var$localeSymbol = Symbol.for('react-aria.i18n.locale');
const $5b160d28a433310d$var$stringsSymbol = Symbol.for('react-aria.i18n.strings');
let $5b160d28a433310d$var$cachedGlobalStrings = undefined;

@@ -31,3 +31,3 @@ class $5b160d28a433310d$export$c17fa47878dc55b6 {

static getGlobalDictionaryForPackage(packageName) {
if (typeof window === "undefined") return null;
if (typeof window === 'undefined') return null;
let locale = window[$5b160d28a433310d$var$localeSymbol];

@@ -46,3 +46,3 @@ if ($5b160d28a433310d$var$cachedGlobalStrings === undefined) {

}
constructor(messages, defaultLocale = "en-US"){
constructor(messages, defaultLocale = 'en-US'){
// Clone messages so we don't modify the original object.

@@ -54,3 +54,3 @@ // Filter out entries with falsy values which may have been caused by applying optimize-locales-plugin.

}
function $5b160d28a433310d$var$getStringsForLocale(locale, strings, defaultLocale = "en-US") {
function $5b160d28a433310d$var$getStringsForLocale(locale, strings, defaultLocale = 'en-US') {
// If there is an exact match, use it.

@@ -66,3 +66,3 @@ if (strings[locale]) return strings[locale];

for(let key in strings){
if (key.startsWith(language + "-")) return strings[key];
if (key.startsWith(language + '-')) return strings[key];
}

@@ -76,3 +76,3 @@ // Nothing close, use english.

return new Intl.Locale(locale).language;
return locale.split("-")[0];
return locale.split('-')[0];
}

@@ -79,0 +79,0 @@

@@ -22,8 +22,8 @@

let message = this.strings.getStringForLocale(key, this.locale);
return typeof message === "function" ? message(variables, this) : message;
return typeof message === 'function' ? message(variables, this) : message;
}
plural(count, options, type = "cardinal") {
let opt = options["=" + count];
if (opt) return typeof opt === "function" ? opt() : opt;
let key = this.locale + ":" + type;
plural(count, options, type = 'cardinal') {
let opt = options['=' + count];
if (opt) return typeof opt === 'function' ? opt() : opt;
let key = this.locale + ':' + type;
let pluralRules = $3e95fbf3429967d1$var$pluralRulesCache.get(key);

@@ -38,3 +38,3 @@ if (!pluralRules) {

opt = options[selected] || options.other;
return typeof opt === "function" ? opt() : opt;
return typeof opt === 'function' ? opt() : opt;
}

@@ -51,3 +51,3 @@ number(value) {

let opt = options[value] || options.other;
return typeof opt === "function" ? opt() : opt;
return typeof opt === 'function' ? opt() : opt;
}

@@ -54,0 +54,0 @@ constructor(locale, strings){

@@ -16,8 +16,8 @@ /*

let message = this.strings.getStringForLocale(key, this.locale);
return typeof message === "function" ? message(variables, this) : message;
return typeof message === 'function' ? message(variables, this) : message;
}
plural(count, options, type = "cardinal") {
let opt = options["=" + count];
if (opt) return typeof opt === "function" ? opt() : opt;
let key = this.locale + ":" + type;
plural(count, options, type = 'cardinal') {
let opt = options['=' + count];
if (opt) return typeof opt === 'function' ? opt() : opt;
let key = this.locale + ':' + type;
let pluralRules = $6db58dc88e78b024$var$pluralRulesCache.get(key);

@@ -32,3 +32,3 @@ if (!pluralRules) {

opt = options[selected] || options.other;
return typeof opt === "function" ? opt() : opt;
return typeof opt === 'function' ? opt() : opt;
}

@@ -45,3 +45,3 @@ number(value) {

let opt = options[value] || options.other;
return typeof opt === "function" ? opt() : opt;
return typeof opt === 'function' ? opt() : opt;
}

@@ -48,0 +48,0 @@ constructor(locale, strings){

{
"name": "@internationalized/string",
"version": "3.2.3-nightly.4624+d80999e89",
"version": "3.2.3",
"description": "Internationalized string formatting and locale negotiation",

@@ -30,3 +30,3 @@ "license": "Apache-2.0",

},
"gitHead": "d80999e897b4d4db9fcfb4e9b8fcdc9fdd700882"
"gitHead": "b77d7d594dff4dcfb5359bffbcfd18142b146433"
}

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc