(bytes)
| 711 | } |
| 712 | |
| 713 | function formatSize(bytes) { |
| 714 | if (bytes === 0 || bytes === null || bytes === undefined) return '-'; |
| 715 | const kb = 1024; |
| 716 | const mb = kb * 1024; |
| 717 | if (bytes >= mb) return `${(bytes / mb).toFixed(2)} MB`; |
| 718 | if (bytes >= kb) return `${(bytes / kb).toFixed(1)} KB`; |
| 719 | return `${bytes} B`; |
| 720 | } |
| 721 | |
| 722 | async function showCacheSection(type) { |
| 723 | ensureUI(); |
no outgoing calls
no test coverage detected