* Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
@@ -12,7 +12,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;
@@ -1393,7 +1393,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 = {};
@@ -2327,13 +2327,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);
@@ -2363,7 +2364,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]) {
@@ -2382,9 +2384,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;
}
/**
@@ -9466,7 +9468,7 @@
* // => true
*/
function clone(value) {
- return baseClone(value);
+ return baseClone(value, false, true);
}
/**
@@ -9499,7 +9501,7 @@
* // => 0
*/
function cloneWith(value, customizer) {
- return baseClone(value, false, customizer);
+ return baseClone(value, false, true, customizer);
}
/**
@@ -9519,7 +9521,7 @@
* // => false
*/
function cloneDeep(value) {
- return baseClone(value, true);
+ return baseClone(value, true, true);
}
/**
@@ -9549,7 +9551,7 @@
* // => 20
*/
function cloneDeepWith(value, customizer) {
- return baseClone(value, true, customizer);
+ return baseClone(value, true, true, customizer);
}
/**
diff --git a/package.json b/package.json
index 3e6d186b07..2f9987fc09 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash",
- "version": "4.6.0",
+ "version": "4.6.1",
"main": "lodash.js",
"private": true,
"devDependencies": {
@@ -18,7 +18,7 @@
"istanbul": "0.4.2",
"jquery": "^2.2.1",
"jscs": "^2.10.1",
- "lodash": "4.4.0",
+ "lodash": "4.5.0",
"platform": "^1.3.1",
"qunit-extras": "^1.5.0",
"qunitjs": "~1.22.0",
pFad - Phonifier reborn
Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy