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

Function inFile

__tests__/large-file-frameworks.test.ts:84–84  ·  view source on GitHub ↗
(file: string, kind: Node['kind'])

Source from the content-addressed store, hash-verified

82 }
83
84 const inFile = (file: string, kind: Node['kind']): Node[] => cg!.getNodesInFile(file).filter((n) => n.kind === kind);
85 const named = (file: string, name: string, kind?: Node['kind']): Node => {
86 const found = cg!.getNodesInFile(file).filter((n) => n.name === name && (!kind || n.kind === kind));
87 expect(found.map((n) => n.kind), `${name} in ${file}`).toHaveLength(1);

Callers 1

Calls 1

getNodesInFileMethod · 0.65

Tested by

no test coverage detected