mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 10:07:48 +00:00
Bump to v4.5.3.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
# lodash v4.5.2
|
# lodash v4.5.3
|
||||||
|
|
||||||
The [lodash](https://lodash.com/) library exported as [npm packages](https://www.npmjs.com/browse/keyword/lodash-modularized) per method.
|
The [lodash](https://lodash.com/) library exported as [npm packages](https://www.npmjs.com/browse/keyword/lodash-modularized) per method.
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# lodash._baseclone v4.5.2
|
# lodash._baseclone v4.5.3
|
||||||
|
|
||||||
The internal [lodash](https://lodash.com/) function `baseClone` exported as a [Node.js](https://nodejs.org/) module.
|
The internal [lodash](https://lodash.com/) function `baseClone` exported as a [Node.js](https://nodejs.org/) module.
|
||||||
|
|
||||||
@@ -15,4 +15,4 @@ In Node.js:
|
|||||||
var baseClone = require('lodash._baseclone');
|
var baseClone = require('lodash._baseclone');
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [package source](https://github.com/lodash/lodash/blob/4.5.2-npm-packages/lodash._baseclone) for more details.
|
See the [package source](https://github.com/lodash/lodash/blob/4.5.3-npm-packages/lodash._baseclone) for more details.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* lodash 4.5.2 (Custom Build) <https://lodash.com/>
|
* lodash 4.5.3 (Custom Build) <https://lodash.com/>
|
||||||
* Build: `lodash modularize exports="npm" -o ./`
|
* Build: `lodash modularize exports="npm" -o ./`
|
||||||
* Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
|
* Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
@@ -728,13 +728,14 @@ function baseAssign(object, source) {
|
|||||||
* @private
|
* @private
|
||||||
* @param {*} value The value to clone.
|
* @param {*} value The value to clone.
|
||||||
* @param {boolean} [isDeep] Specify a deep clone.
|
* @param {boolean} [isDeep] Specify a deep clone.
|
||||||
|
* @param {boolean} [isFull] Specify a clone including symbols.
|
||||||
* @param {Function} [customizer] The function to customize cloning.
|
* @param {Function} [customizer] The function to customize cloning.
|
||||||
* @param {string} [key] The key of `value`.
|
* @param {string} [key] The key of `value`.
|
||||||
* @param {Object} [object] The parent object of `value`.
|
* @param {Object} [object] The parent object of `value`.
|
||||||
* @param {Object} [stack] Tracks traversed objects and their clone counterparts.
|
* @param {Object} [stack] Tracks traversed objects and their clone counterparts.
|
||||||
* @returns {*} Returns the cloned value.
|
* @returns {*} Returns the cloned value.
|
||||||
*/
|
*/
|
||||||
function baseClone(value, isDeep, customizer, key, object, stack) {
|
function baseClone(value, isDeep, isFull, customizer, key, object, stack) {
|
||||||
var result;
|
var result;
|
||||||
if (customizer) {
|
if (customizer) {
|
||||||
result = object ? customizer(value, key, object, stack) : customizer(value);
|
result = object ? customizer(value, key, object, stack) : customizer(value);
|
||||||
@@ -764,7 +765,8 @@ function baseClone(value, isDeep, customizer, key, object, stack) {
|
|||||||
}
|
}
|
||||||
result = initCloneObject(isFunc ? {} : value);
|
result = initCloneObject(isFunc ? {} : value);
|
||||||
if (!isDeep) {
|
if (!isDeep) {
|
||||||
return copySymbols(value, baseAssign(result, value));
|
result = baseAssign(result, value);
|
||||||
|
return isFull ? copySymbols(value, result) : result;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!cloneableTags[tag]) {
|
if (!cloneableTags[tag]) {
|
||||||
@@ -783,9 +785,9 @@ function baseClone(value, isDeep, customizer, key, object, stack) {
|
|||||||
|
|
||||||
// Recursively populate clone (susceptible to call stack limits).
|
// Recursively populate clone (susceptible to call stack limits).
|
||||||
(isArr ? arrayEach : baseForOwn)(value, function(subValue, key) {
|
(isArr ? arrayEach : baseForOwn)(value, function(subValue, key) {
|
||||||
assignValue(result, key, baseClone(subValue, isDeep, customizer, key, value, stack));
|
assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));
|
||||||
});
|
});
|
||||||
return isArr ? result : copySymbols(value, result);
|
return (isFull && !isArr) ? copySymbols(value, result) : result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash._baseclone",
|
"name": "lodash._baseclone",
|
||||||
"version": "4.5.2",
|
"version": "4.5.3",
|
||||||
"description": "The internal lodash function `baseClone` exported as a module.",
|
"description": "The internal lodash function `baseClone` exported as a module.",
|
||||||
"homepage": "https://lodash.com/",
|
"homepage": "https://lodash.com/",
|
||||||
"icon": "https://lodash.com/icon.svg",
|
"icon": "https://lodash.com/icon.svg",
|
||||||
|
|||||||
Reference in New Issue
Block a user