MCPcopy Create free account
hub / github.com/acode/cli / deepAssign

Function deepAssign

cli/commands/create.js:20–31  ·  view source on GitHub ↗
(o1, o2)

Source from the content-addressed store, hash-verified

18const DEFAULT_BUILD = 'functionscript';
19
20function deepAssign(o1, o2) {
21 Object.keys(o2).forEach(k => {
22 if (
23 o1[k] && o2[k] &&
24 typeof o1[k] === 'object' && typeof o2[k] === 'object'
25 ) {
26 deepAssign(o1[k], o2[k]);
27 } else {
28 o1[k] = o2[k];
29 }
30 });
31}
32
33class CreateCommand extends Command {
34

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected