(value: number)
| 28 | export const GRAPH_NODE_BUDGET_MAX = 10_000_000; |
| 29 | |
| 30 | export function clampNodeBudget(value: number): number { |
| 31 | if (!Number.isFinite(value)) return GRAPH_RENDER_NODE_LIMIT; |
| 32 | const stepped = |
| 33 | Math.round(value / GRAPH_NODE_BUDGET_STEP) * GRAPH_NODE_BUDGET_STEP; |
| 34 | if (stepped < GRAPH_NODE_BUDGET_STEP) return GRAPH_NODE_BUDGET_STEP; |
| 35 | if (stepped > GRAPH_NODE_BUDGET_MAX) return GRAPH_NODE_BUDGET_MAX; |
| 36 | return stepped; |
| 37 | } |
| 38 | |
| 39 | /** Which graph to lay out: the code graph (default) or the missed graph — |
| 40 | * only files the indexer could not fully cover, as their file structure. */ |
no outgoing calls
no test coverage detected