Socket
Socket
Sign inDemoInstall

react-localization

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-localization - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

1

lib/LocalizedStrings.js

@@ -77,3 +77,2 @@ 'use strict';

this._props = props;
//Check for use of reserved words
utils.validateTranslationKeys(Object.keys(props[this._defaultLanguage]));

@@ -80,0 +79,0 @@ //Store first level keys (for identifying missing translations)

2

lib/utils.js

@@ -24,3 +24,3 @@ 'use strict';

translationKeys.forEach(function (key) {
if (reservedNames.includes(key)) {
if (reservedNames.indexOf(key) !== -1) {
throw new Error(key + ' cannot be used as a key. It is a reserved word.');

@@ -27,0 +27,0 @@ }

{
"name": "react-localization",
"version": "0.1.1",
"version": "0.1.2",
"description": "Simple module to localize the React interface using the same syntax used in the ReactNativeLocalization module, use 'npm run build' before publishing",

@@ -8,3 +8,3 @@ "scripts": {

"test": "jasmine",
"build": "babel src --out-dir lib --presets=es2015,stage-2"
"build": "babel src --out-dir lib"
},

@@ -31,6 +31,6 @@ "repository": {

"babel-cli": "^6.24.1",
"babel-preset-es2015": "^6.22.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-2": "^6.22.0",
"jasmine": "^2.6.0"
"babel-preset-stage-2": "^6.24.1",
"jasmine": "^2.7.0"
},

@@ -37,0 +37,0 @@ "dependencies": {

@@ -23,3 +23,3 @@ export function getInterfaceLanguage() {

translationKeys.forEach(key => {
if (reservedNames.includes(key)) {
if (reservedNames.indexOf(key) !== -1) {
throw new Error(`${key} cannot be used as a key. It is a reserved word.`);

@@ -26,0 +26,0 @@ }

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