(bytes: number)
| 345 | } |
| 346 | |
| 347 | function formatSize(bytes: number): string { |
| 348 | if (bytes < 1024) return `${bytes} B` |
| 349 | if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB` |
| 350 | if (bytes < 1024 * 1024 * 1024) return `${(bytes / (1024 * 1024)).toFixed(1)} MB` |
| 351 | return `${(bytes / (1024 * 1024 * 1024)).toFixed(1)} GB` |
| 352 | } |
| 353 | |
| 354 | function shortenPath(p: string): string { |
| 355 | const home = os.homedir() |
no outgoing calls
no test coverage detected