Skip to main content
Latest
function cloneDeepWith
import { cloneDeepWith } from "https://deno.land/x/lodash_es@v0.0.2/mod.ts";

This method is like _.cloneWith except that it recursively clones value.

Examples

function customizer(value) { if (_.isElement(value)) { return value.cloneNode(true); } }

var el = _.cloneDeepWith(document.body, customizer);

console.log(el === document.body); // => false console.log(el.nodeName); // => 'BODY' console.log(el.childNodes.length); // => 20

Parameters

value

The value to recursively clone.

customizer