MCPcopy Create free account
hub / github.com/violentmonkey/violentmonkey / deepCopyDiff

Function deepCopyDiff

src/common/object.js:114–121  ·  view source on GitHub ↗
(src, sample)

Source from the content-addressed store, hash-verified

112
113/** @return {?} `undefined` if equal */
114export function deepCopyDiff(src, sample) {
115 if (src === sample) return;
116 if (!src || typeof src !== 'object') return src;
117 if (!sample || typeof sample !== 'object') return deepCopy(src);
118 deepDiff = false;
119 src = (Array.isArray(src) ? deepCopyDiffArrays : deepCopyDiffObjects)(src, sample);
120 if (deepDiff) return src;
121}
122
123function deepCopyDiffArrays(src, sample) {
124 const res = [];

Callers 1

setFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected