MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / #childrenArray

Method #childrenArray

src/lib/fileList.js:482–493  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

480 }
481
482 #childrenArray() {
483 const ar = [];
484 const oldPush = ar.push;
485 ar.push = (...args) => {
486 args.forEach((item) => {
487 if (!(item instanceof Tree)) throw new Error("Invalid tree");
488 item.parent = this;
489 oldPush.call(ar, item);
490 });
491 };
492 return ar;
493 }
494
495 /**
496 * Create a tree

Callers 1

constructorMethod · 0.95

Calls 1

callMethod · 0.80

Tested by

no test coverage detected