formatBytes() — mcp Function Reference
Architecture documentation for the formatBytes() function in zip-repository.ts from the mcp codebase.
Entity Profile
Dependency Diagram
graph TD e2a45e09_2506_abe8_d09f_d033416cdd84["formatBytes()"] 52a097f2_598d_df67_e422_55b20a202d95["zipRepository()"] 52a097f2_598d_df67_e422_55b20a202d95 -->|calls| e2a45e09_2506_abe8_d09f_d033416cdd84 3a4a51ae_b292_2750_c894_60a641d584b1["addFilesRecursively()"] 3a4a51ae_b292_2750_c894_60a641d584b1 -->|calls| e2a45e09_2506_abe8_d09f_d033416cdd84 style e2a45e09_2506_abe8_d09f_d033416cdd84 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/utils/zip-repository.ts lines 707–712
function formatBytes(bytes: number): string {
if (bytes < 1024) return `${bytes} B`;
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(2)} KB`;
if (bytes < 1024 * 1024 * 1024) return `${(bytes / (1024 * 1024)).toFixed(2)} MB`;
return `${(bytes / (1024 * 1024 * 1024)).toFixed(2)} GB`;
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does formatBytes() do?
formatBytes() is a function in the mcp codebase.
What calls formatBytes()?
formatBytes() is called by 2 function(s): addFilesRecursively, zipRepository.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free