|
8447 | 8447 | * otherwise they are assigned by reference. If `customizer` is provided it's
|
8448 | 8448 | * invoked to produce the cloned values. If `customizer` returns `undefined`
|
8449 | 8449 | * cloning is handled by the method instead. The `customizer` is bound to
|
8450 |
| - * `thisArg` and invoked with two argument; (value [, index|key, object]). |
| 8450 | + * `thisArg` and invoked with up to three argument; (value [, index|key, object]). |
8451 | 8451 | *
|
8452 | 8452 | * **Note:** This method is loosely based on the
|
8453 | 8453 | * [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm).
|
|
8503 | 8503 | isDeep = false;
|
8504 | 8504 | }
|
8505 | 8505 | return typeof customizer == 'function'
|
8506 |
| - ? baseClone(value, isDeep, bindCallback(customizer, thisArg, 1)) |
| 8506 | + ? baseClone(value, isDeep, bindCallback(customizer, thisArg, 3)) |
8507 | 8507 | : baseClone(value, isDeep);
|
8508 | 8508 | }
|
8509 | 8509 |
|
8510 | 8510 | /**
|
8511 | 8511 | * Creates a deep clone of `value`. If `customizer` is provided it's invoked
|
8512 | 8512 | * to produce the cloned values. If `customizer` returns `undefined` cloning
|
8513 | 8513 | * is handled by the method instead. The `customizer` is bound to `thisArg`
|
8514 |
| - * and invoked with two argument; (value [, index|key, object]). |
| 8514 | + * and invoked with up to three argument; (value [, index|key, object]). |
8515 | 8515 | *
|
8516 | 8516 | * **Note:** This method is loosely based on the
|
8517 | 8517 | * [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm).
|
|
8554 | 8554 | */
|
8555 | 8555 | function cloneDeep(value, customizer, thisArg) {
|
8556 | 8556 | return typeof customizer == 'function'
|
8557 |
| - ? baseClone(value, true, bindCallback(customizer, thisArg, 1)) |
| 8557 | + ? baseClone(value, true, bindCallback(customizer, thisArg, 3)) |
8558 | 8558 | : baseClone(value, true);
|
8559 | 8559 | }
|
8560 | 8560 |
|
|
8749 | 8749 | * Performs a deep comparison between two values to determine if they are
|
8750 | 8750 | * equivalent. If `customizer` is provided it's invoked to compare values.
|
8751 | 8751 | * If `customizer` returns `undefined` comparisons are handled by the method
|
8752 |
| - * instead. The `customizer` is bound to `thisArg` and invoked with three |
8753 |
| - * arguments: (value, other [, index|key]). |
| 8752 | + * instead. The `customizer` is bound to `thisArg` and invoked with up to |
| 8753 | + * three arguments: (value, other [, index|key]). |
8754 | 8754 | *
|
8755 | 8755 | * **Note:** This method supports comparing arrays, booleans, `Date` objects,
|
8756 | 8756 | * numbers, `Object` objects, regexes, and strings. Objects are compared by
|
|
0 commit comments