diff --git a/README.md b/README.md index 68509a445..aa981c2db 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# lodash v4.9.0 +# lodash v4.9.1 The [lodash](https://lodash.com/) library exported as [npm packages](https://www.npmjs.com/browse/keyword/lodash-modularized) per method. diff --git a/lodash.flatmapdeep/README.md b/lodash.flatmapdeep/README.md index 6d872c330..f1799df56 100644 --- a/lodash.flatmapdeep/README.md +++ b/lodash.flatmapdeep/README.md @@ -1,4 +1,4 @@ -# lodash.flatmapdeep v4.9.0 +# lodash.flatmapdeep v4.9.1 The [lodash](https://lodash.com/) method `_.flatMapDeep` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var flatMapDeep = require('lodash.flatmapdeep'); ``` -See the [documentation](https://lodash.com/docs#flatMapDeep) or [package source](https://github.com/lodash/lodash/blob/4.9.0-npm-packages/lodash.flatmapdeep) for more details. +See the [documentation](https://lodash.com/docs#flatMapDeep) or [package source](https://github.com/lodash/lodash/blob/4.9.1-npm-packages/lodash.flatmapdeep) for more details. diff --git a/lodash.flatmapdeep/index.js b/lodash.flatmapdeep/index.js index f2d937285..fcdb21f2e 100644 --- a/lodash.flatmapdeep/index.js +++ b/lodash.flatmapdeep/index.js @@ -57,7 +57,8 @@ var arrayBufferTag = '[object ArrayBuffer]', /** Used to match property names within property paths. */ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/, - rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(\.|\[\])(?:\4|$))/g; + reLeadingDot = /^\./, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; /** * Used to match `RegExp` @@ -100,10 +101,10 @@ var freeSelf = typeof self == 'object' && self && self.Object === Object && self var root = freeGlobal || freeSelf || Function('return this')(); /** Detect free variable `exports`. */ -var freeExports = freeGlobal && typeof exports == 'object' && exports; +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ -var freeModule = freeExports && typeof module == 'object' && module; +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; @@ -1384,6 +1385,7 @@ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) { } } stack['delete'](array); + stack['delete'](other); return result; } @@ -1544,6 +1546,7 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) { } } stack['delete'](object); + stack['delete'](other); return result; } @@ -1708,7 +1711,7 @@ function indexKeys(object) { */ function isFlattenable(value) { return isArray(value) || isArguments(value) || - !!(spreadableSymbol && value && value[spreadableSymbol]) + !!(spreadableSymbol && value && value[spreadableSymbol]); } /** @@ -1825,8 +1828,13 @@ function matchesStrictComparable(key, srcValue) { * @returns {Array} Returns the property path array. */ var stringToPath = memoize(function(string) { + string = toString(string); + var result = []; - toString(string).replace(rePropName, function(match, number, quote, string) { + if (reLeadingDot.test(string)) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, string) { result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); }); return result; diff --git a/lodash.flatmapdeep/package.json b/lodash.flatmapdeep/package.json index 65974223b..d1ad08142 100644 --- a/lodash.flatmapdeep/package.json +++ b/lodash.flatmapdeep/package.json @@ -1,6 +1,6 @@ { "name": "lodash.flatmapdeep", - "version": "4.9.0", + "version": "4.9.1", "description": "The lodash method `_.flatMapDeep` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.flatmapdepth/README.md b/lodash.flatmapdepth/README.md index 1a81833be..c5d157bf4 100644 --- a/lodash.flatmapdepth/README.md +++ b/lodash.flatmapdepth/README.md @@ -1,4 +1,4 @@ -# lodash.flatmapdepth v4.9.0 +# lodash.flatmapdepth v4.9.1 The [lodash](https://lodash.com/) method `_.flatMapDepth` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var flatMapDepth = require('lodash.flatmapdepth'); ``` -See the [documentation](https://lodash.com/docs#flatMapDepth) or [package source](https://github.com/lodash/lodash/blob/4.9.0-npm-packages/lodash.flatmapdepth) for more details. +See the [documentation](https://lodash.com/docs#flatMapDepth) or [package source](https://github.com/lodash/lodash/blob/4.9.1-npm-packages/lodash.flatmapdepth) for more details. diff --git a/lodash.flatmapdepth/index.js b/lodash.flatmapdepth/index.js index ce84e74a8..9d2c47af3 100644 --- a/lodash.flatmapdepth/index.js +++ b/lodash.flatmapdepth/index.js @@ -59,7 +59,8 @@ var arrayBufferTag = '[object ArrayBuffer]', /** Used to match property names within property paths. */ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/, - rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(\.|\[\])(?:\4|$))/g; + reLeadingDot = /^\./, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; /** * Used to match `RegExp` @@ -117,10 +118,10 @@ var freeSelf = typeof self == 'object' && self && self.Object === Object && self var root = freeGlobal || freeSelf || Function('return this')(); /** Detect free variable `exports`. */ -var freeExports = freeGlobal && typeof exports == 'object' && exports; +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ -var freeModule = freeExports && typeof module == 'object' && module; +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; @@ -1401,6 +1402,7 @@ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) { } } stack['delete'](array); + stack['delete'](other); return result; } @@ -1561,6 +1563,7 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) { } } stack['delete'](object); + stack['delete'](other); return result; } @@ -1725,7 +1728,7 @@ function indexKeys(object) { */ function isFlattenable(value) { return isArray(value) || isArguments(value) || - !!(spreadableSymbol && value && value[spreadableSymbol]) + !!(spreadableSymbol && value && value[spreadableSymbol]); } /** @@ -1842,8 +1845,13 @@ function matchesStrictComparable(key, srcValue) { * @returns {Array} Returns the property path array. */ var stringToPath = memoize(function(string) { + string = toString(string); + var result = []; - toString(string).replace(rePropName, function(match, number, quote, string) { + if (reLeadingDot.test(string)) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, string) { result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); }); return result; diff --git a/lodash.flatmapdepth/package.json b/lodash.flatmapdepth/package.json index 9b152ae2f..529fa1157 100644 --- a/lodash.flatmapdepth/package.json +++ b/lodash.flatmapdepth/package.json @@ -1,6 +1,6 @@ { "name": "lodash.flatmapdepth", - "version": "4.9.0", + "version": "4.9.1", "description": "The lodash method `_.flatMapDepth` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", diff --git a/lodash.meanby/README.md b/lodash.meanby/README.md index 5ef4d266f..c593f6600 100644 --- a/lodash.meanby/README.md +++ b/lodash.meanby/README.md @@ -1,4 +1,4 @@ -# lodash.meanby v4.9.0 +# lodash.meanby v4.9.1 The [lodash](https://lodash.com/) method `_.meanBy` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var meanBy = require('lodash.meanby'); ``` -See the [documentation](https://lodash.com/docs#meanBy) or [package source](https://github.com/lodash/lodash/blob/4.9.0-npm-packages/lodash.meanby) for more details. +See the [documentation](https://lodash.com/docs#meanBy) or [package source](https://github.com/lodash/lodash/blob/4.9.1-npm-packages/lodash.meanby) for more details. diff --git a/lodash.meanby/index.js b/lodash.meanby/index.js index bb148856c..8e1ded414 100644 --- a/lodash.meanby/index.js +++ b/lodash.meanby/index.js @@ -58,7 +58,8 @@ var arrayBufferTag = '[object ArrayBuffer]', /** Used to match property names within property paths. */ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/, - rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(\.|\[\])(?:\4|$))/g; + reLeadingDot = /^\./, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; /** * Used to match `RegExp` @@ -101,10 +102,10 @@ var freeSelf = typeof self == 'object' && self && self.Object === Object && self var root = freeGlobal || freeSelf || Function('return this')(); /** Detect free variable `exports`. */ -var freeExports = freeGlobal && typeof exports == 'object' && exports; +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ -var freeModule = freeExports && typeof module == 'object' && module; +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; @@ -1242,6 +1243,7 @@ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) { } } stack['delete'](array); + stack['delete'](other); return result; } @@ -1402,6 +1404,7 @@ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) { } } stack['delete'](object); + stack['delete'](other); return result; } @@ -1671,8 +1674,13 @@ function matchesStrictComparable(key, srcValue) { * @returns {Array} Returns the property path array. */ var stringToPath = memoize(function(string) { + string = toString(string); + var result = []; - toString(string).replace(rePropName, function(match, number, quote, string) { + if (reLeadingDot.test(string)) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, string) { result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); }); return result; diff --git a/lodash.meanby/package.json b/lodash.meanby/package.json index accd59d89..08ff29e80 100644 --- a/lodash.meanby/package.json +++ b/lodash.meanby/package.json @@ -1,6 +1,6 @@ { "name": "lodash.meanby", - "version": "4.9.0", + "version": "4.9.1", "description": "The lodash method `_.meanBy` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg",