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

Function fn

__tests__/nextjs-proxy.test.ts:224–228  ·  view source on GitHub ↗
(cg: CodeGraph, name: string, filePath: string)

Source from the content-addressed store, hash-verified

222 proxyEdges(cg).filter((e) => e.target === target.id).map((e) => [cg.getNode(e.source)!.name, meta(e).matcher ?? null])
223 );
224 const fn = (cg: CodeGraph, name: string, filePath: string): Node => {
225 const node = cg.getNodesByName(name).find((n) => n.filePath === filePath && n.kind === 'function');
226 if (!node) throw new Error(`no function ${name} in ${filePath}`);
227 return node;
228 };
229
230 it('links the routes the matcher accepts, under src/, and only from the proxy Next loads', async () => {
231 const { cg } = await project({

Callers 1

Calls 1

getNodesByNameMethod · 0.65

Tested by

no test coverage detected