(bytes: number)
| 338 | } |
| 339 | |
| 340 | function formatSize(bytes: number): string { |
| 341 | if (bytes < 1024) return `${bytes} B` |
| 342 | if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB` |
| 343 | if (bytes < 1024 * 1024 * 1024) return `${(bytes / (1024 * 1024)).toFixed(1)} MB` |
| 344 | return `${(bytes / (1024 * 1024 * 1024)).toFixed(1)} GB` |
| 345 | } |
| 346 | |
| 347 | function shortenPath(p: string): string { |
| 348 | const home = os.homedir() |
no outgoing calls
no test coverage detected