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