MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / globClosure

Function globClosure

src/resolution/workspace-packages.ts:1042–1047  ·  view source on GitHub ↗

`states` with every `**` that can match no folder at all stepped over.

(glob: GlobSegment[], states: Set<number>)

Source from the content-addressed store, hash-verified

1040
1041/** `states` with every `**` that can match no folder at all stepped over. */
1042function globClosure(glob: GlobSegment[], states: Set<number>): Set<number> {
1043 for (const i of [...states]) {
1044 for (let j = i; glob[j]?.globstar; j++) states.add(j + 1);
1045 }
1046 return states;
1047}
1048
1049/** Read the `name` field from a member directory's package.json. */
1050function readPackageName(dirAbs: string): string | null {

Callers 3

expandWorkspaceGlobFunction · 0.85
workspaceGlobMatchesFunction · 0.85
globStepFunction · 0.85

Calls 1

addMethod · 0.45

Tested by

no test coverage detected