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

Function byQname

__tests__/frameworks-integration.test.ts:1246–1249  ·  view source on GitHub ↗
(q: string, file?: string)

Source from the content-addressed store, hash-verified

1244 await cg.indexAll();
1245 try {
1246 const byQname = (q: string, file?: string) =>
1247 cg
1248 .getNodesByName(q.split('.').pop()!)
1249 .filter((n) => n.qualifiedName === q && (!file || n.filePath === file));
1250
1251 const moduleDecl = byQname('module.vpc')[0];
1252 expect(moduleDecl, 'module.vpc declaration node').toBeDefined();

Callers 1

Calls 1

getNodesByNameMethod · 0.65

Tested by

no test coverage detected