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

Function of

__tests__/graph.test.ts:677–677  ·  view source on GitHub ↗
(list: Edge[])

Source from the content-addressed store, hash-verified

675 const opts = { limit: 1000, maxDepth: Infinity, direction: 'outgoing' as const, nodeKinds: [] as Node['kind'][], edgeKinds: [] as Edge['kind'][], ...options };
676 const site = (e: Edge) => `${e.source}|${e.target}|${e.kind}|${e.line ?? -1}|${e.column ?? -1}`;
677 const of = (list: Edge[]) => (opts.edgeKinds.length > 0 ? list.filter((e) => opts.edgeKinds.includes(e.kind)) : list);
678 const adjacent = (id: string): Edge[] => {
679 const out = of(edges.filter((e) => e.source === id));
680 const into = of(edges.filter((e) => e.target === id));

Callers 1

adjacentFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected