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

@mitm/intl

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mitm/intl - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

6

intl.esm.js

@@ -30,2 +30,3 @@ function getSupportedLocale(wanted, available, fallback, redirects) {

// eslint-disable-next-line prefer-named-capture-group,require-unicode-regexp
const interpolationMatcher = /{{\s?([^{}\s]*)\s?}}/g;

@@ -348,10 +349,9 @@ function mergeTranslations(target, source) {

function translate(registry, locale, key, values) {
var _a;
const translation = registry.getTranslations(locale);
const defaultTranslation = registry.getTranslations(registry.defaultLocale); // Leave || operator, don't use ?? because we want to use fallbacks on '' strings.
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
const value = getStringByKey(translation, key) || getStringByKey(defaultTranslation, key) || key; //=> Interpolate
return (_a = interpolate(value, values)) !== null && _a !== void 0 ? _a : key;
return interpolate(value, values);
}

@@ -358,0 +358,0 @@ /**

@@ -526,10 +526,9 @@ (function (global, factory) {

function translate(registry, locale, key, values) {
var _a;
var translation = registry.getTranslations(locale);
var defaultTranslation = registry.getTranslations(registry.defaultLocale); // Leave || operator, don't use ?? because we want to use fallbacks on '' strings.
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
var value = getStringByKey(translation, key) || getStringByKey(defaultTranslation, key) || key; //=> Interpolate
return (_a = interpolate(value, values)) !== null && _a !== void 0 ? _a : key;
return interpolate(value, values);
}

@@ -536,0 +535,0 @@ /**

{
"name": "@mitm/intl",
"version": "1.2.0",
"version": "1.3.0",
"dependencies": {
"@types/express": "*"
},
"peerDependencies": {
"date-fns": "^2.25.0"
},
"main": "./intl.umd.js",
"module": "./intl.esm.js",
"typings": "./index.d.ts",
"dependencies": {},
"peerDependencies": {
"date-fns": "^2.25.0"
}
"typings": "./index.d.ts"
}
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