(index: number, total: number)
| 28 | |
| 29 | /** `STEP 2/10`. One-based, because the reader is not counting from zero. */ |
| 30 | export function progressLabel(index: number, total: number): string { |
| 31 | if (total <= 0) { |
| 32 | return 'STEP 0/0'; |
| 33 | } |
| 34 | const at = Math.min(Math.max(index, 0), total - 1); |
| 35 | return `STEP ${at + 1}/${total}`; |
| 36 | } |
| 37 | |
| 38 | /** |
| 39 | * The chain of blocks beside the label. |
no outgoing calls
no test coverage detected