i18next-scanner
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -24,5 +24,5 @@ 'use strict'; | ||
var _isObject = require('lodash/isObject'); | ||
var _isPlainObject = require('lodash/isPlainObject'); | ||
var _isObject2 = _interopRequireDefault(_isObject); | ||
var _isPlainObject2 = _interopRequireDefault(_isPlainObject); | ||
@@ -65,10 +65,2 @@ var _isUndefined = require('lodash/isUndefined'); | ||
var _toPairs = require('lodash/toPairs'); | ||
var _toPairs2 = _interopRequireDefault(_toPairs); | ||
var _sortBy = require('lodash/sortBy'); | ||
var _sortBy2 = _interopRequireDefault(_sortBy); | ||
var _esprima = require('esprima'); | ||
@@ -80,2 +72,6 @@ | ||
var _sortobject = require('sortobject'); | ||
var _sortobject2 = _interopRequireDefault(_sortobject); | ||
var _ensureArray = require('./ensure-array'); | ||
@@ -293,4 +289,4 @@ | ||
if (debug) { | ||
for (var _len = arguments.length, args = Array(_len), _key2 = 0; _key2 < _len; _key2++) { | ||
args[_key2] = arguments[_key2]; | ||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
} | ||
@@ -461,3 +457,3 @@ | ||
while (r = re.exec(content)) { | ||
var _key3 = (0, _trim2.default)(r[1]); | ||
var _key2 = (0, _trim2.default)(r[1]); | ||
var fragment = (0, _trim2.default)(r[2]); | ||
@@ -467,3 +463,3 @@ fragment = fragment.replace(/\s+/g, ' '); | ||
var _options = { defaultValue: defaultValue }; | ||
setter(_key3, _options); | ||
setter(_key2, _options); | ||
} | ||
@@ -545,3 +541,3 @@ return this; | ||
if ((0, _isObject2.default)(key)) { | ||
if ((0, _isPlainObject2.default)(key)) { | ||
opts = key; | ||
@@ -562,13 +558,4 @@ key = undefined; | ||
var namespaces = resStore[lng]; | ||
Object.keys(namespaces).forEach(function (ns) { | ||
var pairs = (0, _toPairs2.default)(namespaces[ns]); | ||
resStore[lng][ns] = (0, _sortBy2.default)(pairs, function (pair) { | ||
return pair[0]; | ||
}).reduce(function (memo, pair) { | ||
var _key = pair[0]; | ||
var _value = pair[1]; | ||
memo[_key] = _value; | ||
return memo; | ||
}, {}); | ||
resStore[lng][ns] = (0, _sortobject2.default)(namespaces[ns]); | ||
}); | ||
@@ -676,3 +663,3 @@ }); | ||
if (!(0, _isObject2.default)(resLoad)) { | ||
if (!(0, _isPlainObject2.default)(resLoad)) { | ||
// Skip undefined namespace | ||
@@ -679,0 +666,0 @@ _this3.log('The namespace "' + ns + '" does not exist:', { key: key, options: options }); |
{ | ||
"name": "i18next-scanner", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "Scan your code, extract translation keys/values, and merge them into i18n resource files.", | ||
@@ -49,2 +49,3 @@ "homepage": "https://github.com/i18next/i18next-scanner", | ||
"parse5": "^3.0.2", | ||
"sortobject": "^1.1.1", | ||
"through2": "^2.0.3", | ||
@@ -51,0 +52,0 @@ "vinyl": "^2.1.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
61196
7
905
+ Addedsortobject@^1.1.1
+ Addededitions@2.3.1(transitive)
+ Addederrlop@2.2.0(transitive)
+ Addedsemver@6.3.1(transitive)
+ Addedsortobject@1.3.0(transitive)