MCPcopy Index your code
hub / github.com/nodejs/node / parseNegate

Method parseNegate

deps/minimatch/index.js:1545–1558  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1543 return a.length === b.length && result;
1544 }
1545 parseNegate() {
1546 if (this.nonegate)
1547 return;
1548 const pattern = this.pattern;
1549 let negate = false;
1550 let negateOffset = 0;
1551 for (let i = 0; i < pattern.length && pattern.charAt(i) === "!"; i++) {
1552 negate = !negate;
1553 negateOffset++;
1554 }
1555 if (negateOffset)
1556 this.pattern = pattern.slice(negateOffset);
1557 this.negate = negate;
1558 }
1559 // set partial to true to test if, for example,
1560 // "/a/b" matches the start of "/*/b/*/d"
1561 // Partial means, if you run out of file before you run

Callers 1

makeMethod · 0.80

Calls 1

sliceMethod · 0.65

Tested by

no test coverage detected