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

Function num

web/js/app.js:26–26  ·  view source on GitHub ↗
(v)

Source from the content-addressed store, hash-verified

24const esc = (v) => String(v ?? '').replace(/[&<>"']/g, ch => ({'&':'&amp;','<':'&lt;','>':'&gt;','"':'&quot;',"'":'&#39;'}[ch]));
25const clamp = (v, min, max) => Math.max(min, Math.min(max, v));
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); }

Callers 15

humanMinMBFromKBFunction · 0.85
humanMinMBFromMBFunction · 0.85
humanMinMBFromBFunction · 0.85
humanMinKBFromBFunction · 0.85
lossValuesFunction · 0.85
metricsFunction · 0.85
valueFunction · 0.85
gaugeHTMLFunction · 0.85
resourceMeterFunction · 0.85
detailResourceHTMLFunction · 0.85
packetLossLineFunction · 0.85
bucketsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected