(n: number)
| 23 | const KILL_MULTIPLIER = 8; |
| 24 | |
| 25 | function formatBytes(n: number): string { |
| 26 | if (n < 1024) return `${n} B`; |
| 27 | if (n < 1024 * 1024) return `${(n / 1024).toFixed(1)} KB`; |
| 28 | return `${(n / (1024 * 1024)).toFixed(1)} MB`; |
| 29 | } |
| 30 | |
| 31 | /** |
| 32 | * Capture child-process stream output without retaining more than `maxBytes`. |
no outgoing calls
no test coverage detected