MCPcopy Create free account
hub / github.com/play-co/devkit / clone

Function clone

src/util/obj.js:4–13  ·  view source on GitHub ↗
(dest, src)

Source from the content-addressed store, hash-verified

2 * Shallow clone
3 */
4var clone = function (dest, src) {
5 // Clear destination
6 Object.keys(dest).forEach(function(key) {
7 dest[key] = void 0;
8 });
9 // Copy source into destination
10 Object.keys(src).forEach(function(key) {
11 dest[key] = src[key];
12 });
13};
14
15/**
16 * Replace array contents with another array

Callers 1

setElementFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…