MCPcopy Create free account
hub / github.com/stemdeckapp/stemdeck / formatBytes

Function formatBytes

static/js/main.js:297–299  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

295 if (!urlWrap || !urlInput || !fileInput || !filePill) return;
296
297 function formatBytes(n) {
298 return n < 1024 * 1024 ? `${(n / 1024).toFixed(0)} KB` : `${(n / 1024 / 1024).toFixed(1)} MB`;
299 }
300
301 const MAX_UPLOAD_BYTES = 400 * 1024 * 1024; // must match server _MAX_UPLOAD_BYTES
302

Callers 1

applyFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected