MCPcopy Index your code
hub / github.com/nodejs/node / #adopt

Method #adopt

deps/minimatch/index.js:736–744  ·  view source on GitHub ↗
(child, index)

Source from the content-addressed store, hash-verified

734 this.#adopt(child, index);
735 }
736 #adopt(child, index) {
737 const gc = child.#parts[0];
738 this.#parts.splice(index, 1, ...gc.#parts);
739 for (const p of gc.#parts) {
740 if (typeof p === "object")
741 p.#parent = this;
742 }
743 this.#toString = void 0;
744 }
745 #canUsurpType(c) {
746 const m = usurpMap.get(this.type);
747 return !!m?.has(c);

Callers 2

#adoptWithSpaceMethod · 0.80
#flattenMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected