(graph)
| 2821 | } |
| 2822 | |
| 2823 | function parseGraph (graph) { |
| 2824 | const root = Object.entries(graph).find(([key]) => key.includes('(root)')) |
| 2825 | const result = { root: parseGraphRecursive(...root), workspaces: [] } |
| 2826 | |
| 2827 | Object.entries(graph).filter(([key]) => key.includes('(workspace)')) |
| 2828 | .forEach(([key, value]) => { |
| 2829 | result.workspaces.push(parseGraphRecursive(key, value)) |
| 2830 | }) |
| 2831 | return result |
| 2832 | } |
| 2833 | |
| 2834 | function isLoopToken (obj) { |
| 2835 | return typeof obj === 'string' && /^\(back \d+\)$/.test(obj) |
no test coverage detected