MCPcopy
hub / github.com/vercel/next.js / formatSize

Function formatSize

packages/next-codemod/bin/agents-md.ts:29–35  ·  view source on GitHub ↗
(bytes: number)

Source from the content-addressed store, hash-verified

27const DOCS_DIR_NAME = '.next-docs'
28
29function formatSize(bytes: number): string {
30 if (bytes < 1024) return `${bytes} B`
31 const kb = bytes / 1024
32 if (kb < 1024) return `${kb.toFixed(1)} KB`
33 const mb = kb / 1024
34 return `${mb.toFixed(1)} MB`
35}
36
37export async function runAgentsMd(options: AgentsMdOptions): Promise<void> {
38 const cwd = process.cwd()

Callers 1

runAgentsMdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected