(snapshots: NodeSnapshot[])
| 27 | } |
| 28 | |
| 29 | export function createTree(snapshots: NodeSnapshot[]): VisibleTree { |
| 30 | return { |
| 31 | rootIds: snapshots.filter((item) => !item.parentId).map((item) => item.id), |
| 32 | order: snapshots.map((item) => item.id), |
| 33 | stats: { |
| 34 | totalNodes: snapshots.length, |
| 35 | maxDepth: 1, |
| 36 | capped: false, |
| 37 | cappedNodeIds: [] |
| 38 | }, |
| 39 | nodes: new Map(snapshots.map((item) => [item.id, item])) |
| 40 | } |
| 41 | } |
no outgoing calls
no test coverage detected