MCPcopy Index your code
hub / github.com/stemkoski/stemkoski.github.com / clone

Function clone

MathBox/mathbox-bundle.js:36880–36889  ·  view source on GitHub ↗

* Creates a clone of `value`. If `isDeep` is `true` nested objects will also * be cloned, otherwise they will be assigned by reference. If a callback * is provided it will be executed to produce the cloned values. If the * callback returns `undefined` cloning will be handled by the me

(value, isDeep, callback, thisArg)

Source from the content-addressed store, hash-verified

36878 * // => 0
36879 */
36880 function clone(value, isDeep, callback, thisArg) {
36881 // allows working with "Collections" methods without using their `index`
36882 // and `collection` arguments for `isDeep` and `callback`
36883 if (typeof isDeep != 'boolean' && isDeep != null) {
36884 thisArg = callback;
36885 callback = isDeep;
36886 isDeep = false;
36887 }
36888 return baseClone(value, isDeep, typeof callback == 'function' && baseCreateCallback(callback, thisArg, 1));
36889 }
36890
36891 /**
36892 * Creates a deep clone of `value`. If a callback is provided it will be

Callers

nothing calls this directly

Calls 2

baseCloneFunction · 0.85
baseCreateCallbackFunction · 0.85

Tested by

no test coverage detected