mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 18:37:50 +00:00
Bump to v4.6.1.
This commit is contained in:
24
main.js
24
main.js
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* @license
|
||||
* lodash 4.6.0 (Custom Build) <https://lodash.com/>
|
||||
* lodash 4.6.1 (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash exports="amd" -d -o ./main.js`
|
||||
* Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
|
||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||
@@ -13,7 +13,7 @@
|
||||
var undefined;
|
||||
|
||||
/** Used as the semantic version number. */
|
||||
var VERSION = '4.6.0';
|
||||
var VERSION = '4.6.1';
|
||||
|
||||
/** Used as the size to enable large array optimizations. */
|
||||
var LARGE_ARRAY_SIZE = 200;
|
||||
@@ -1394,7 +1394,7 @@
|
||||
var metaMap = WeakMap && new WeakMap;
|
||||
|
||||
/** Detect if properties shadowing those on `Object.prototype` are non-enumerable. */
|
||||
var nonEnumShadows = !({ 'valueOf': 1 }).propertyIsEnumerable('valueOf');
|
||||
var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf');
|
||||
|
||||
/** Used to lookup unminified function names. */
|
||||
var realNames = {};
|
||||
@@ -2328,13 +2328,14 @@
|
||||
* @private
|
||||
* @param {*} value The value to 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 {string} [key] The key of `value`.
|
||||
* @param {Object} [object] The parent object of `value`.
|
||||
* @param {Object} [stack] Tracks traversed objects and their clone counterparts.
|
||||
* @returns {*} Returns the cloned value.
|
||||
*/
|
||||
function baseClone(value, isDeep, customizer, key, object, stack) {
|
||||
function baseClone(value, isDeep, isFull, customizer, key, object, stack) {
|
||||
var result;
|
||||
if (customizer) {
|
||||
result = object ? customizer(value, key, object, stack) : customizer(value);
|
||||
@@ -2364,7 +2365,8 @@
|
||||
}
|
||||
result = initCloneObject(isFunc ? {} : value);
|
||||
if (!isDeep) {
|
||||
return copySymbols(value, baseAssign(result, value));
|
||||
result = baseAssign(result, value);
|
||||
return isFull ? copySymbols(value, result) : result;
|
||||
}
|
||||
} else {
|
||||
if (!cloneableTags[tag]) {
|
||||
@@ -2383,9 +2385,9 @@
|
||||
|
||||
// Recursively populate clone (susceptible to call stack limits).
|
||||
(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;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -9467,7 +9469,7 @@
|
||||
* // => true
|
||||
*/
|
||||
function clone(value) {
|
||||
return baseClone(value);
|
||||
return baseClone(value, false, true);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -9500,7 +9502,7 @@
|
||||
* // => 0
|
||||
*/
|
||||
function cloneWith(value, customizer) {
|
||||
return baseClone(value, false, customizer);
|
||||
return baseClone(value, false, true, customizer);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -9520,7 +9522,7 @@
|
||||
* // => false
|
||||
*/
|
||||
function cloneDeep(value) {
|
||||
return baseClone(value, true);
|
||||
return baseClone(value, true, true);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -9550,7 +9552,7 @@
|
||||
* // => 20
|
||||
*/
|
||||
function cloneDeepWith(value, customizer) {
|
||||
return baseClone(value, true, customizer);
|
||||
return baseClone(value, true, true, customizer);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user