mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 00:57:48 +00:00
Bump to v3.10.1.
This commit is contained in:
@@ -2,10 +2,10 @@ define(['../internal/baseClone', '../internal/bindCallback', '../internal/isIter
|
||||
|
||||
/**
|
||||
* Creates a clone of `value`. If `isDeep` is `true` nested objects are cloned,
|
||||
* otherwise they are assigned by reference. If `customizer` is provided it is
|
||||
* otherwise they are assigned by reference. If `customizer` is provided it's
|
||||
* invoked to produce the cloned values. If `customizer` returns `undefined`
|
||||
* cloning is handled by the method instead. The `customizer` is bound to
|
||||
* `thisArg` and invoked with two argument; (value [, index|key, object]).
|
||||
* `thisArg` and invoked with up to three argument; (value [, index|key, object]).
|
||||
*
|
||||
* **Note:** This method is loosely based on the
|
||||
* [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm).
|
||||
@@ -61,7 +61,7 @@ define(['../internal/baseClone', '../internal/bindCallback', '../internal/isIter
|
||||
isDeep = false;
|
||||
}
|
||||
return typeof customizer == 'function'
|
||||
? baseClone(value, isDeep, bindCallback(customizer, thisArg, 1))
|
||||
? baseClone(value, isDeep, bindCallback(customizer, thisArg, 3))
|
||||
: baseClone(value, isDeep);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
define(['../internal/baseClone', '../internal/bindCallback'], function(baseClone, bindCallback) {
|
||||
|
||||
/**
|
||||
* Creates a deep clone of `value`. If `customizer` is provided it is invoked
|
||||
* Creates a deep clone of `value`. If `customizer` is provided it's invoked
|
||||
* to produce the cloned values. If `customizer` returns `undefined` cloning
|
||||
* is handled by the method instead. The `customizer` is bound to `thisArg`
|
||||
* and invoked with two argument; (value [, index|key, object]).
|
||||
* and invoked with up to three argument; (value [, index|key, object]).
|
||||
*
|
||||
* **Note:** This method is loosely based on the
|
||||
* [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm).
|
||||
@@ -47,7 +47,7 @@ define(['../internal/baseClone', '../internal/bindCallback'], function(baseClone
|
||||
*/
|
||||
function cloneDeep(value, customizer, thisArg) {
|
||||
return typeof customizer == 'function'
|
||||
? baseClone(value, true, bindCallback(customizer, thisArg, 1))
|
||||
? baseClone(value, true, bindCallback(customizer, thisArg, 3))
|
||||
: baseClone(value, true);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
define(['./isArguments', './isArray', '../internal/isArrayLike', './isFunction', '../internal/isObjectLike', './isString', '../object/keys'], function(isArguments, isArray, isArrayLike, isFunction, isObjectLike, isString, keys) {
|
||||
|
||||
/**
|
||||
* Checks if `value` is empty. A value is considered empty unless it is an
|
||||
* Checks if `value` is empty. A value is considered empty unless it's an
|
||||
* `arguments` object, array, string, or jQuery-like collection with a length
|
||||
* greater than `0` or an object with own enumerable properties.
|
||||
*
|
||||
|
||||
@@ -5,10 +5,10 @@ define(['../internal/baseIsEqual', '../internal/bindCallback'], function(baseIsE
|
||||
|
||||
/**
|
||||
* Performs a deep comparison between two values to determine if they are
|
||||
* equivalent. If `customizer` is provided it is invoked to compare values.
|
||||
* equivalent. If `customizer` is provided it's invoked to compare values.
|
||||
* If `customizer` returns `undefined` comparisons are handled by the method
|
||||
* instead. The `customizer` is bound to `thisArg` and invoked with three
|
||||
* arguments: (value, other [, index|key]).
|
||||
* instead. The `customizer` is bound to `thisArg` and invoked with up to
|
||||
* three arguments: (value, other [, index|key]).
|
||||
*
|
||||
* **Note:** This method supports comparing arrays, booleans, `Date` objects,
|
||||
* numbers, `Object` objects, regexes, and strings. Objects are compared by
|
||||
|
||||
@@ -31,7 +31,7 @@ define(['./isObject'], function(isObject) {
|
||||
function isFunction(value) {
|
||||
// The use of `Object#toString` avoids issues with the `typeof` operator
|
||||
// in older versions of Chrome and Safari which return 'function' for regexes
|
||||
// and Safari 8 equivalents which return 'object' for typed array constructors.
|
||||
// and Safari 8 which returns 'object' for typed array constructors.
|
||||
return isObject(value) && objToString.call(value) == funcTag;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ define(['../internal/baseIsMatch', '../internal/bindCallback', '../internal/getM
|
||||
/**
|
||||
* Performs a deep comparison between `object` and `source` to determine if
|
||||
* `object` contains equivalent property values. If `customizer` is provided
|
||||
* it is invoked to compare values. If `customizer` returns `undefined`
|
||||
* it's invoked to compare values. If `customizer` returns `undefined`
|
||||
* comparisons are handled by the method instead. The `customizer` is bound
|
||||
* to `thisArg` and invoked with three arguments: (value, other, index|key).
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user