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

Function route

__tests__/nextjs.test.ts:208–212  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

206 });
207
208 const route = (name: string): Node => {
209 const r = cg.getNodesByKind('route').find((r) => r.name === name);
210 if (!r) throw new Error(`no route ${name}: ${cg.getNodesByKind('route').map((r) => r.name).join(', ')}`);
211 return r;
212 };
213 const sym = (name: string): Node => {
214 const n = cg.getNodesByName(name).find((n) => n.kind !== 'route' && n.kind !== 'file' && n.kind !== 'import');
215 if (!n) throw new Error(`no symbol ${name}`);

Callers 1

nextjs.test.tsFile · 0.70

Calls 3

mapMethod · 0.80
getNodesByKindMethod · 0.65
joinMethod · 0.45

Tested by

no test coverage detected