(bytes)
| 4825 | } |
| 4826 | function formatFileSize(bytes) { |
| 4827 | if (bytes === 0) return '0 B'; |
| 4828 | const k = 1024; |
| 4829 | const sizes = ['B', 'KB', 'MB', 'GB']; |
| 4830 | const i = Math.floor(Math.log(bytes) / Math.log(k)); |
| 4831 | return parseFloat((bytes / Math.pow(k, i)).toFixed(1)) + ' ' + sizes[i]; |
| 4832 | } |
| 4833 | |
| 4834 | // Remove old pack manager functions and replace with browser navigation functions |
| 4835 | async function populatePackGrids(packManager) { |
| 4836 | const themeContainer = document.getElementById('carrot-theme-packs'); |
no outgoing calls
no test coverage detected