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

react-intl-universal

Package Overview
Dependencies
Maintainers
1
Versions
138
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-intl-universal - npm Package Compare versions

Comparing version 1.14.3 to 1.15.0

15

lib/index.js

@@ -101,3 +101,4 @@ /*

escapeHtml: true, // disable escape html in variable mode
commonLocaleDataUrls: COMMON_LOCALE_DATA_URLS
commonLocaleDataUrls: COMMON_LOCALE_DATA_URLS,
fallbackLocale: null // Locale to use if a key is not found in the current locale
};

@@ -130,4 +131,12 @@ }

if (msg == null) {
this.options.warningHandler("react-intl-universal key \"" + key + "\" not defined in " + currentLocale);
return "";
if (this.options.fallbackLocale) {
msg = this.getDescendantProp(locales[this.options.fallbackLocale], key);
if (msg == null) {
this.options.warningHandler("react-intl-universal key \"" + key + "\" not defined in " + currentLocale + " or the fallback locale, " + this.options.fallbackLocale);
return "";
}
} else {
this.options.warningHandler("react-intl-universal key \"" + key + "\" not defined in " + currentLocale);
return "";
}
}

@@ -134,0 +143,0 @@ if (variables) {

2

package.json
{
"name": "react-intl-universal",
"version": "1.14.3",
"version": "1.15.0",
"description": "Internationalize React apps. Not only for React.Component but also for Vanilla JS.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -281,2 +281,3 @@ ## Work at Alibaba 加入我们

* @param {Object} options.warningHandler Ability to accumulate missing messages using third party services. See https://github.com/alibaba/react-intl-universal/releases/tag/1.11.1
* @param {string} options.fallbackLocale Fallback locale such as 'zh-CN' to use if a key is not found in the current locale
* @returns {Promise}

@@ -283,0 +284,0 @@ */

@@ -73,2 +73,3 @@ declare module "react-intl-universal" {

* @param {Object} options.warningHandler Ability to accumulate missing messages using third party services like Sentry
* @param {string} options.fallbackLocale Fallback locale such as 'zh-CN' to use if a key is not found in the current locale
* @param {boolean} options.escapeHtml To escape html. Default value is true.

@@ -75,0 +76,0 @@ * @returns {Promise}

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