MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / mergeNodesInto

Function mergeNodesInto

dashboard/graph/src/explorerState.ts:19–26  ·  view source on GitHub ↗
(
  previous: ReadonlyMap<string, GraphNode>,
  nodes: GraphNode[],
)

Source from the content-addressed store, hash-verified

17}
18
19export function mergeNodesInto(
20 previous: ReadonlyMap<string, GraphNode>,
21 nodes: GraphNode[],
22): Map<string, GraphNode> {
23 const next = new Map(previous);
24 for (const node of nodes) next.set(node.id, { ...next.get(node.id), ...node });
25 return next;
26}
27
28export function mergeEdgesInto(
29 previous: ReadonlyMap<string, GraphEdge>,

Callers 1

CodeGraphExplorerFunction · 0.90

Calls 1

setMethod · 0.45

Tested by

no test coverage detected