MCPcopy Create free account
hub / github.com/cppla/ServerStatus / humanMinMBFromKB

Function humanMinMBFromKB

web/js/app.js:28–28  ·  view source on GitHub ↗
(kb)

Source from the content-addressed store, hash-verified

26const num = (v) => typeof v === 'number' && Number.isFinite(v) ? v : 0;
27
28function humanMinMBFromKB(kb){ return humanBytes(num(kb) * 1000, 1000 * 1000); }
29function humanMinMBFromMB(mb){ return humanBytes(num(mb) * 1000 * 1000, 1000 * 1000); }
30function humanMinMBFromB(bytes){ return humanBytes(num(bytes), 1000 * 1000); }
31function humanMinKBFromB(bytes){ return humanBytes(num(bytes), 1000); }

Callers 1

detailResourceHTMLFunction · 0.85

Calls 2

humanBytesFunction · 0.85
numFunction · 0.85

Tested by

no test coverage detected