| 674 | const byId = new Map(nodes.map((n) => [n.id, n])); |
| 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)); |