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

Function renders

__tests__/jsx-render-work.test.ts:42–47  ·  view source on GitHub ↗
(graph: CodeGraph, name: string)

Source from the content-addressed store, hash-verified

40
41 /** What each named function renders, by jsx-render edge. */
42 const renders = (graph: CodeGraph, name: string): string[] => {
43 const from = graph.getNodesByName(name).find((n) => n.kind === 'function' || n.kind === 'component')!;
44 return graph.getOutgoingEdges(from.id)
45 .filter((e) => (e.metadata as { synthesizedBy?: string } | undefined)?.synthesizedBy === 'jsx-render')
46 .map((e) => graph.getNode(e.target)!.name);
47 };
48
49 it('scans a line that many components share once, not once per component', async () => {
50 const COMPONENTS = 60;

Callers 1

Calls 4

mapMethod · 0.80
getNodeMethod · 0.80
getNodesByNameMethod · 0.65
getOutgoingEdgesMethod · 0.45

Tested by

no test coverage detected