| 1 | import { clsx, type ClassValue } from "clsx"; |
| 2 | import { twMerge } |
| 3 | |
| 4 | export function cn(... |
| 5 | return twMerge(clsx |
| 6 | } |
| 7 | |
| 8 | const BYTE_UNITS = [ |
| 9 | |
| 10 | /** `1536` → `"1.5 KB"`, in binary units like the API's limits. */ |
| 11 | export function formatBytes(bytes |
| 12 | let value = |
| 13 | let unit = |
| 14 | while (value >= |
| 15 | value /= 1024; |
| 16 | unit++; |
| 17 | } |
| 18 | return unit === |
| 19 | } |