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

react-i18nify

Package Overview
Dependencies
Maintainers
2
Versions
131
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-i18nify - npm Package Compare versions

Comparing version 1.6.1 to 1.6.2

13

build/lib/I18n.js

@@ -27,2 +27,4 @@ 'use strict';

var handleMissingTranslation = _formatMissingTranslation2.default; /* eslint no-underscore-dangle: "off" */
exports.default = {

@@ -33,2 +35,3 @@ _localeKey: 'en',

_getLocale: null,
_handleMissingTranslation: handleMissingTranslation,

@@ -87,2 +90,8 @@ get _translations() {

},
setHandleMissingTranslation: function setHandleMissingTranslation(fn) {
if (typeof fn !== 'function') {
throw new Error('Handle missing translation must be a function');
}
this._handleMissingTranslation = fn;
},
t: function t(key) {

@@ -119,3 +128,3 @@ var replacements = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];

} catch (err) {
return (0, _formatMissingTranslation2.default)(key);
return this._handleMissingTranslation(key);
}

@@ -171,2 +180,2 @@ return this._replace(translation, replacements);

}
}; /* eslint no-underscore-dangle: "off" */
};

2

package.json
{
"name": "react-i18nify",
"version": "1.6.1",
"version": "1.6.2",
"description": "Simple i18n translation and localization components and helpers for React applications.",

@@ -5,0 +5,0 @@ "main": "./build/index.js",

@@ -9,2 +9,4 @@ /* eslint no-underscore-dangle: "off" */

const handleMissingTranslation = formatMissingTranslation;
export default {

@@ -15,2 +17,3 @@ _localeKey: 'en',

_getLocale: null,
_handleMissingTranslation: handleMissingTranslation,

@@ -67,3 +70,8 @@ get _translations() {

},
setHandleMissingTranslation(fn) {
if (typeof fn !== 'function') {
throw new Error('Handle missing translation must be a function');
}
this._handleMissingTranslation = fn;
},
t(key, replacements = {}) {

@@ -103,3 +111,3 @@ return this._translate(key, replacements);

} catch (err) {
return formatMissingTranslation(key);
return this._handleMissingTranslation(key);
}

@@ -106,0 +114,0 @@ return this._replace(translation, replacements);

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