Lodash _.cloneDeepWith() Method
The Lodash _.cloneDeepWith() method is used to clone value in a recursive way, just the same as the _.cloneWith() method but performs in a recursive manner.
_.cloneDeepWith( value, customizer )
Parameter: This method accepts two parameters as mentioned above and described below:
- value: This parameter holds the value which will be cloned in a recursive way.
- customizer: This parameter holds the function to customize the clone.
Return value: This method returns the cloned value.
Below example illustrate the Lodash _.cloneDeepWith() Method:
Example 1: Cloning Head element.
Example 2: Cloning body element.