MCPcopy Index your code
hub / github.com/jashkenas/underscore / clone

Function clone

underscore.js:660–663  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

658
659 // Create a (shallow-cloned) duplicate of an object.
660 function clone(obj) {
661 if (!isObject(obj)) return obj;
662 return isArray(obj) ? obj.slice() : extend({}, obj);
663 }
664
665 // Invokes `interceptor` with the `obj` and then returns `obj`.
666 // The primary purpose of this method is to "tap into" a method chain, in

Callers

nothing calls this directly

Calls 1

isObjectFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…