(len, noBytes)
| 195 | } |
| 196 | |
| 197 | export function formatByteLength(len, noBytes) { |
| 198 | if (!len) return ''; |
| 199 | if (len < 1024 && !noBytes) return `${len} B`; |
| 200 | if ((len /= 1024) < 1024) return `${Math.round(len)} k`; |
| 201 | return `${+(len / 1024).toFixed(1)} M`; |
| 202 | } |
| 203 | |
| 204 | // Used by `injected` |
| 205 | export function isEmpty(obj) { |