MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / clone

Function clone

lib/web/jshint.js:9796–9807  ·  view source on GitHub ↗

* Creates a clone of `value`. If `isDeep` is `true` nested objects are cloned, * otherwise they are assigned by reference. If `customizer` is provided it is * invoked to produce the cloned values. If `customizer` returns `undefined` * cloning is handled by the method instead. The `cus

(value, isDeep, customizer, thisArg)

Source from the content-addressed store, hash-verified

9794 * // => 0
9795 */
9796 function clone(value, isDeep, customizer, thisArg) {
9797 if (isDeep && typeof isDeep != 'boolean' && isIterateeCall(value, isDeep, customizer)) {
9798 isDeep = false;
9799 }
9800 else if (typeof isDeep == 'function') {
9801 thisArg = customizer;
9802 customizer = isDeep;
9803 isDeep = false;
9804 }
9805 customizer = typeof customizer == 'function' && bindCallback(customizer, thisArg, 1);
9806 return baseClone(value, isDeep, customizer);
9807 }
9808
9809 /**
9810 * Creates a deep clone of `value`. If `customizer` is provided it is invoked

Callers

nothing calls this directly

Calls 3

isIterateeCallFunction · 0.85
bindCallbackFunction · 0.85
baseCloneFunction · 0.85

Tested by

no test coverage detected