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

Function sym

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

Source from the content-addressed store, hash-verified

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}`);
216 return n;
217 };
218 const navs = (from: Node) => cg.getOutgoingEdges(from.id).filter((e) => e.kind === 'navigates');
219
220 it('names every page and endpoint, and binds a page to its component and an endpoint to its function', () => {

Callers 1

nextjs.test.tsFile · 0.70

Calls 1

getNodesByNameMethod · 0.65

Tested by

no test coverage detected