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

Function find

__tests__/dart-const-constructors.test.ts:202–203  ·  view source on GitHub ↗
(file: string, qualifiedName: string)

Source from the content-addressed store, hash-verified

200 cg = await CodeGraph.init(root, { index: true });
201 const graph = cg;
202 const find = (file: string, qualifiedName: string): Node | undefined =>
203 graph.getNodesInFile(file).find((n) => n.qualifiedName === qualifiedName);
204 const node = (file: string, qualifiedName: string): Node => {
205 const found = find(file, qualifiedName);
206 expect(found, `${file} ${qualifiedName}`).toBeDefined();

Callers 2

nodeFunction · 0.70

Calls 1

getNodesInFileMethod · 0.65

Tested by

no test coverage detected