react-localization
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -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) |
@@ -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 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
110610
2646