(v)
| 24 | const esc = (v) => String(v ?? '').replace(/[&<>"']/g, ch => ({'&':'&','<':'<','>':'>','"':'"',"'":'''}[ch])); |
| 25 | const clamp = (v, min, max) => Math.max(min, Math.min(max, v)); |
| 26 | const num = (v) => typeof v === 'number' && Number.isFinite(v) ? v : 0; |
| 27 | |
| 28 | function humanMinMBFromKB(kb){ return humanBytes(num(kb) * 1000, 1000 * 1000); } |
| 29 | function humanMinMBFromMB(mb){ return humanBytes(num(mb) * 1000 * 1000, 1000 * 1000); } |
no outgoing calls
no test coverage detected