formatBytes() — mcp Function Reference
Architecture documentation for the formatBytes() function in zip-repository.ts from the mcp codebase.
Entity Profile
Dependency Diagram
graph TD c7ef4400_cc66_9f8c_3fec_50f4c76e3cdf["formatBytes()"] b00e0b6e_8e66_44d2_f709_c8c6bbb476c9["zip-repository.ts"] c7ef4400_cc66_9f8c_3fec_50f4c76e3cdf -->|defined in| b00e0b6e_8e66_44d2_f709_c8c6bbb476c9 bbbd3356_722d_4bf8_09d2_706412487d25["zipRepository()"] bbbd3356_722d_4bf8_09d2_706412487d25 -->|calls| c7ef4400_cc66_9f8c_3fec_50f4c76e3cdf bb858fdb_9a3b_a551_d94a_ce5beeb5b86f["addFilesRecursively()"] bb858fdb_9a3b_a551_d94a_ce5beeb5b86f -->|calls| c7ef4400_cc66_9f8c_3fec_50f4c76e3cdf style c7ef4400_cc66_9f8c_3fec_50f4c76e3cdf 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
Defined In
Called By
Source
Frequently Asked Questions
What does formatBytes() do?
formatBytes() is a function in the mcp codebase, defined in src/utils/zip-repository.ts.
Where is formatBytes() defined?
formatBytes() is defined in src/utils/zip-repository.ts at line 707.
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