(bytes: number)
| 9 | } |
| 10 | |
| 11 | function formatBytes(bytes: number): string { |
| 12 | if (bytes < 1024) return `${bytes} B`; |
| 13 | if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`; |
| 14 | return `${(bytes / (1024 * 1024)).toFixed(1)} MB`; |
| 15 | } |
| 16 | |
| 17 | const LANGUAGE_LABELS: Record<string, string> = { |
| 18 | typescript: "TypeScript", |