From 5338f5758c5b8169dda63d5ebcf3dad45a01491a Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Tue, 1 Mar 2016 22:47:11 -0800 Subject: [PATCH] Bump to v4.5.3. --- README.md | 2 +- lodash._baseclone/README.md | 4 ++-- lodash._baseclone/index.js | 12 +++++++----- lodash._baseclone/package.json | 2 +- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index bc87a77fc..c5acbbf13 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/lodash._baseclone/README.md b/lodash._baseclone/README.md index 1a8a00c31..7c997274e 100644 --- a/lodash._baseclone/README.md +++ b/lodash._baseclone/README.md @@ -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. @@ -15,4 +15,4 @@ In Node.js: 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. diff --git a/lodash._baseclone/index.js b/lodash._baseclone/index.js index 7b79d910f..478175078 100644 --- a/lodash._baseclone/index.js +++ b/lodash._baseclone/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.5.2 (Custom Build) + * lodash 4.5.3 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -728,13 +728,14 @@ function baseAssign(object, source) { * @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); @@ -764,7 +765,8 @@ function baseClone(value, isDeep, customizer, key, object, stack) { } 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]) { @@ -783,9 +785,9 @@ function baseClone(value, isDeep, customizer, key, object, stack) { // 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; } /** diff --git a/lodash._baseclone/package.json b/lodash._baseclone/package.json index da4cf15cd..15479086a 100644 --- a/lodash._baseclone/package.json +++ b/lodash._baseclone/package.json @@ -1,6 +1,6 @@ { "name": "lodash._baseclone", - "version": "4.5.2", + "version": "4.5.3", "description": "The internal lodash function `baseClone` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg",