MCPcopy Index your code
hub / github.com/simstudioai/sim / formatSize

Function formatSize

apps/sim/lib/copilot/chat/workspace-context.ts:641–645  ·  view source on GitHub ↗
(bytes: number)

Source from the content-addressed store, hash-verified

639}
640
641function formatSize(bytes: number): string {
642 if (bytes < 1024) return `${bytes}B`
643 if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)}KB`
644 return `${(bytes / (1024 * 1024)).toFixed(1)}MB`
645}

Callers 1

fileLineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected