(bytes: number)
| 59 | |
| 60 | /** Format bytes as human-readable string */ |
| 61 | export function formatBytes(bytes: number): string { |
| 62 | const mb = bytes / (1024 * 1024) |
| 63 | if (mb >= 1024) { |
| 64 | return `${(mb / 1024).toFixed(1)}GB` |
| 65 | } |
| 66 | return `${mb.toFixed(0)}MB` |
| 67 | } |
| 68 | |
| 69 | /** Create a progress bar */ |
| 70 | export function createProgressBar(percent: number, width: number): string { |
no outgoing calls
no test coverage detected