This method is like cloneWith except that it recursively clones value.
The customizer is invoked with up to four arguments
(value [, index|key, object, stack]).
Parameters
value: any
The value to recursively clone.
customizer: ((...any: any[]) => any)
The function to customize cloning.
(...any): any
Parameters
Rest...any: any[]
Returns any
Returns any
Returns the deep cloned value.
Since
5.3.0
See
cloneWith
Example
functioncustomizer(value) { if (isElement(value)) { returnvalue.cloneNode(true) } }
This method is like
cloneWith
except that it recursively clonesvalue
. The customizer is invoked with up to four arguments (value [, index|key, object, stack]).