refactor: utilities function

This commit is contained in:
2025-10-15 11:35:39 +03:00
parent 45ef0c61c7
commit a8f5ba44ea
3 changed files with 23 additions and 30 deletions

View File

@@ -796,13 +796,6 @@ function calculateStorageUsage() {
return new Blob([snippetsData]).size;
}
// Format bytes to human-readable size
function formatBytes(bytes) {
if (bytes < 1024) return `${bytes} B`;
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
return `${(bytes / (1024 * 1024)).toFixed(2)} MB`;
}
// Update storage monitor display
function updateStorageMonitor() {
const usedBytes = calculateStorageUsage();