MCPcopy Create free account
hub / github.com/nodejs/node / #usurp

Method #usurp

deps/minimatch/index.js:759–774  ·  view source on GitHub ↗
(child)

Source from the content-addressed store, hash-verified

757 return this.#canUsurpType(gc.type);
758 }
759 #usurp(child) {
760 const m = usurpMap.get(this.type);
761 const gc = child.#parts[0];
762 const nt = m?.get(gc.type);
763 if (!nt)
764 return false;
765 this.#parts = gc.#parts;
766 for (const p of this.#parts) {
767 if (typeof p === "object") {
768 p.#parent = this;
769 }
770 }
771 this.type = nt;
772 this.#toString = void 0;
773 this.#emptyExt = false;
774 }
775 static fromGlob(pattern, options = {}) {
776 const ast = new _a(null, void 0, options);
777 _a.#parseAST(pattern, ast, 0, options, 0);

Callers 1

#flattenMethod · 0.80

Calls 1

getMethod · 0.65

Tested by

no test coverage detected