MCPcopy Create free account
hub / github.com/su-kaka/gcli2api / formatFileSize

Function formatFileSize

front/common.js:614–618  ·  view source on GitHub ↗
(bytes)

Source from the content-addressed store, hash-verified

612}
613
614function formatFileSize(bytes) {
615 if (bytes < 1024) return bytes + ' B';
616 if (bytes < 1024 * 1024) return Math.round(bytes / 1024) + ' KB';
617 return Math.round(bytes / (1024 * 1024)) + ' MB';
618}
619
620function formatCooldownTime(remainingSeconds) {
621 const hours = Math.floor(remainingSeconds / 3600);

Callers 1

updateFileListFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected