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

Method #canAdopt

deps/minimatch/index.js:716–725  ·  view source on GitHub ↗
(child, map = adoptionMap)

Source from the content-addressed store, hash-verified

714 return this.#canAdopt(child, adoptionWithSpaceMap);
715 }
716 #canAdopt(child, map = adoptionMap) {
717 if (!child || typeof child !== "object" || child.type !== null || child.#parts.length !== 1 || this.type === null) {
718 return false;
719 }
720 const gc = child.#parts[0];
721 if (!gc || typeof gc !== "object" || gc.type === null) {
722 return false;
723 }
724 return this.#canAdoptType(gc.type, map);
725 }
726 #canAdoptType(c, map = adoptionAnyMap) {
727 return !!map.get(this.type)?.includes(c);
728 }

Callers 2

#canAdoptWithSpaceMethod · 0.80
#flattenMethod · 0.80

Calls 1

#canAdoptTypeMethod · 0.80

Tested by

no test coverage detected