Compare commits

..

1 Commits

Author SHA1 Message Date
John-David Dalton
a83b4ebd53 Bump to v4.6.1. 2016-03-01 22:13:24 -08:00
11 changed files with 27 additions and 16 deletions

View File

@@ -1,4 +1,4 @@
# lodash-es v4.6.0
# lodash-es v4.6.1
The [lodash](https://lodash.com/) library exported as [ES](http://www.ecma-international.org/ecma-262/6.0/) modules.
@@ -7,4 +7,4 @@ Generated using [lodash-cli](https://www.npmjs.com/package/lodash-cli):
$ lodash modularize exports=es -o ./
```
See the [package source](https://github.com/lodash/lodash/tree/4.6.0-es) for more details.
See the [package source](https://github.com/lodash/lodash/tree/4.6.1-es) for more details.

View File

@@ -66,13 +66,14 @@ cloneableTags[weakMapTag] = false;
* @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);
@@ -102,7 +103,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]) {
@@ -121,9 +123,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;
}
export default baseClone;

View File

@@ -11,8 +11,11 @@ var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/** Built-in value references. */
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
/** Detect if properties shadowing those on `Object.prototype` are non-enumerable. */
var nonEnumShadows = !({ 'valueOf': 1 }).propertyIsEnumerable('valueOf');
var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf');
/**
* Assigns own enumerable properties of source objects to the destination

View File

@@ -5,8 +5,14 @@ import isArrayLike from './isArrayLike';
import isPrototype from './_isPrototype';
import keysIn from './keysIn';
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Built-in value references. */
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
/** Detect if properties shadowing those on `Object.prototype` are non-enumerable. */
var nonEnumShadows = !({ 'valueOf': 1 }).propertyIsEnumerable('valueOf');
var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf');
/**
* This method is like `_.assign` except that it iterates over own and

View File

@@ -25,7 +25,7 @@ import baseClone from './_baseClone';
* // => true
*/
function clone(value) {
return baseClone(value);
return baseClone(value, false, true);
}
export default clone;

View File

@@ -17,7 +17,7 @@ import baseClone from './_baseClone';
* // => false
*/
function cloneDeep(value) {
return baseClone(value, true);
return baseClone(value, true, true);
}
export default cloneDeep;

View File

@@ -27,7 +27,7 @@ import baseClone from './_baseClone';
* // => 20
*/
function cloneDeepWith(value, customizer) {
return baseClone(value, true, customizer);
return baseClone(value, true, true, customizer);
}
export default cloneDeepWith;

View File

@@ -30,7 +30,7 @@ import baseClone from './_baseClone';
* // => 0
*/
function cloneWith(value, customizer) {
return baseClone(value, false, customizer);
return baseClone(value, false, true, customizer);
}
export default cloneWith;

View File

@@ -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 modularize exports="es" -o ./`
* Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
@@ -44,7 +44,7 @@ import toInteger from './toInteger';
import lodash from './wrapperLodash';
/** Used as the semantic version number. */
var VERSION = '4.6.0';
var VERSION = '4.6.1';
/** Used to compose bitmasks for wrapper metadata. */
var BIND_KEY_FLAG = 2;

View File

@@ -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 modularize exports="es" -o ./`
* Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>

View File

@@ -1,6 +1,6 @@
{
"name": "lodash-es",
"version": "4.6.0",
"version": "4.6.1",
"description": "Lodash exported as ES modules.",
"homepage": "https://lodash.com/custom-builds",
"license": "MIT",