A file size as people say it: "1.9 MB", "640 KB".
(bytes: number)
| 1220 | |
| 1221 | /** A file size as people say it: "1.9 MB", "640 KB". */ |
| 1222 | function formatFileSize(bytes: number): string { |
| 1223 | return bytes >= 1024 * 1024 ? `${(bytes / 1024 / 1024).toFixed(1)} MB` : `${Math.ceil(bytes / 1024)} KB`; |
| 1224 | } |
| 1225 | |
| 1226 | /** |
| 1227 | * One line naming the source files left out of the graph for their size, or |
no outgoing calls
no test coverage detected