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

Function byQname

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

Source from the content-addressed store, hash-verified

1136 await cg.indexAll();
1137 try {
1138 const byQname = (q: string, file?: string) =>
1139 cg
1140 .getNodesByName(q.split('.').pop()!)
1141 .filter((n) => n.qualifiedName === q && (!file || n.filePath === file));
1142
1143 const moduleDecl = byQname('module.vpc')[0];
1144 expect(moduleDecl, 'module.vpc declaration node').toBeDefined();

Callers 1

Calls 1

getNodesByNameMethod · 0.65

Tested by

no test coverage detected