MCPcopy Create free account
hub / github.com/aetherstate/GODMOD3.AI / formatBytes

Function formatBytes

SettingsModal.tsx:2199–2199  ·  view source on GitHub ↗
(b: number)

Source from the content-addressed store, hash-verified

2197 const STORAGE_CAP = 5 * 1024 * 1024 // ~5 MB typical browser limit
2198 const storagePercent = Math.min(100, Math.round((storageUsed / STORAGE_CAP) * 100))
2199 const formatBytes = (b: number) => b < 1024 ? `${b} B` : b < 1048576 ? `${(b / 1024).toFixed(1)} KB` : `${(b / 1048576).toFixed(1)} MB`
2200
2201 const handleExport = () => {
2202 // Export everything persisted to localStorage — full self-custody backup.

Callers 1

DataTabFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected