mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 10:07:48 +00:00
Provide correct argsCount hint to customizer functions of clone methods.
This commit is contained in:
@@ -8447,7 +8447,7 @@
|
|||||||
* otherwise they are assigned by reference. If `customizer` is provided it's
|
* otherwise they are assigned by reference. If `customizer` is provided it's
|
||||||
* invoked to produce the cloned values. If `customizer` returns `undefined`
|
* invoked to produce the cloned values. If `customizer` returns `undefined`
|
||||||
* cloning is handled by the method instead. The `customizer` is bound to
|
* 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
|
* **Note:** This method is loosely based on the
|
||||||
* [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm).
|
* [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm).
|
||||||
@@ -8503,7 +8503,7 @@
|
|||||||
isDeep = false;
|
isDeep = false;
|
||||||
}
|
}
|
||||||
return typeof customizer == 'function'
|
return typeof customizer == 'function'
|
||||||
? baseClone(value, isDeep, bindCallback(customizer, thisArg, 1))
|
? baseClone(value, isDeep, bindCallback(customizer, thisArg, 3))
|
||||||
: baseClone(value, isDeep);
|
: baseClone(value, isDeep);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -8511,7 +8511,7 @@
|
|||||||
* Creates a deep clone of `value`. If `customizer` is provided it's invoked
|
* Creates a deep clone of `value`. If `customizer` is provided it's invoked
|
||||||
* to produce the cloned values. If `customizer` returns `undefined` cloning
|
* to produce the cloned values. If `customizer` returns `undefined` cloning
|
||||||
* is handled by the method instead. The `customizer` is bound to `thisArg`
|
* 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
|
* **Note:** This method is loosely based on the
|
||||||
* [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm).
|
* [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm).
|
||||||
@@ -8554,7 +8554,7 @@
|
|||||||
*/
|
*/
|
||||||
function cloneDeep(value, customizer, thisArg) {
|
function cloneDeep(value, customizer, thisArg) {
|
||||||
return typeof customizer == 'function'
|
return typeof customizer == 'function'
|
||||||
? baseClone(value, true, bindCallback(customizer, thisArg, 1))
|
? baseClone(value, true, bindCallback(customizer, thisArg, 3))
|
||||||
: baseClone(value, true);
|
: baseClone(value, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -8749,8 +8749,8 @@
|
|||||||
* Performs a deep comparison between two values to determine if they are
|
* Performs a deep comparison between two values to determine if they are
|
||||||
* equivalent. If `customizer` is provided it's 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
|
* If `customizer` returns `undefined` comparisons are handled by the method
|
||||||
* instead. The `customizer` is bound to `thisArg` and invoked with three
|
* instead. The `customizer` is bound to `thisArg` and invoked with up to
|
||||||
* arguments: (value, other [, index|key]).
|
* three arguments: (value, other [, index|key]).
|
||||||
*
|
*
|
||||||
* **Note:** This method supports comparing arrays, booleans, `Date` objects,
|
* **Note:** This method supports comparing arrays, booleans, `Date` objects,
|
||||||
* numbers, `Object` objects, regexes, and strings. Objects are compared by
|
* numbers, `Object` objects, regexes, and strings. Objects are compared by
|
||||||
|
|||||||
Reference in New Issue
Block a user