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

Method secondPhasePreProcess

deps/minimatch/index.js:1496–1508  ·  view source on GitHub ↗
(globParts)

Source from the content-addressed store, hash-verified

1494 // {<pre>/**/<rest>,<pre>/**/<p>/<rest>} -> <pre>/**/<rest>
1495 // ^-- not valid because ** doens't follow symlinks
1496 secondPhasePreProcess(globParts) {
1497 for (let i = 0; i < globParts.length - 1; i++) {
1498 for (let j = i + 1; j < globParts.length; j++) {
1499 const matched = this.partsMatch(globParts[i], globParts[j], !this.preserveMultipleSlashes);
1500 if (matched) {
1501 globParts[i] = [];
1502 globParts[j] = matched;
1503 break;
1504 }
1505 }
1506 }
1507 return globParts.filter((gs) => gs.length);
1508 }
1509 partsMatch(a, b, emptyGSMatch = false) {
1510 let ai = 0;
1511 let bi = 0;

Callers 1

preprocessMethod · 0.80

Calls 2

partsMatchMethod · 0.80
filterMethod · 0.65

Tested by

no test coverage detected