(bytes: number)
| 9 | } |
| 10 | |
| 11 | function formatBytes(bytes: number): string { |
| 12 | const mb = bytes / 1024 / 1024; |
| 13 | return mb >= 1 ? `${mb.toFixed(1)}MB` : `${(bytes / 1024).toFixed(1)}KB`; |
| 14 | } |
| 15 | |
| 16 | function formatPercent(percent: number): string { |
| 17 | return `${Math.round(percent)}%`; |
no outgoing calls
no test coverage detected