MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / adjacencyOf

Function adjacencyOf

graph-ui/src/pseudocode/flow-model.ts:139–153  ·  view source on GitHub ↗

Which symbols each symbol calls, in the order the walk recorded, deduplicated.

(edges: readonly ClosureEdge[])

Source from the content-addressed store, hash-verified

137
138/** Which symbols each symbol calls, in the order the walk recorded, deduplicated. */
139function adjacencyOf(edges: readonly ClosureEdge[]): Map<string, string[]> {
140 const out = new Map<string, string[]>();
141 const seen = new Set<string>();
142 for (const edge of edges) {
143 const pair = `${edge.from} ${edge.to}`;
144 if (seen.has(pair)) {
145 continue;
146 }
147 seen.add(pair);
148 const list = out.get(edge.from) ?? [];
149 list.push(edge.to);
150 out.set(edge.from, list);
151 }
152 return out;
153}
154
155/** One walkable step of the explainer: a numbered line, and where it sits in the block. */
156export interface FlowStep {

Callers 1

flowNodesFunction · 0.85

Calls 2

getMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected