MCPcopy Index your code
hub / github.com/SocketCluster/socketcluster / cloneDeep

Function cloneDeep

app/public/socketcluster-client.js:6227–6237  ·  view source on GitHub ↗
(val, instanceClone)

Source from the content-addressed store, hash-verified

6225const isPlainObject = require('is-plain-object');
6226
6227function cloneDeep(val, instanceClone) {
6228 switch (typeOf(val)) {
6229 case 'object':
6230 return cloneObjectDeep(val, instanceClone);
6231 case 'array':
6232 return cloneArrayDeep(val, instanceClone);
6233 default: {
6234 return clone(val);
6235 }
6236 }
6237}
6238
6239function cloneObjectDeep(val, instanceClone) {
6240 if (typeof instanceClone === 'function') {

Callers 3

cloneObjectDeepFunction · 0.85
cloneArrayDeepFunction · 0.85

Calls 3

cloneObjectDeepFunction · 0.85
cloneArrayDeepFunction · 0.85
cloneFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…