MCPcopy Index your code
hub / github.com/forloopcodes/contextplus / getEdgesForNode

Function getEdgesForNode

src/core/memory-graph.ts:117–119  ·  view source on GitHub ↗
(graph: GraphStore, nodeId: string)

Source from the content-addressed store, hash-verified

115}
116
117function getEdgesForNode(graph: GraphStore, nodeId: string): MemoryEdge[] {
118 return Object.values(graph.edges).filter(e => e.source === nodeId || e.target === nodeId);
119}
120
121function getNeighborId(edge: MemoryEdge, fromId: string): string {
122 return edge.source === fromId ? edge.target : edge.source;

Callers 3

traverseNeighborsFunction · 0.85
pruneStaleLinksFunction · 0.85
collectTraversalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected