MCPcopy Create free account
hub / github.com/basecamp/omarchy / formatHeaderSpeed

Function formatHeaderSpeed

shell/plugins/panels/network/Model.js:23–28  ·  view source on GitHub ↗
(mbps)

Source from the content-addressed store, hash-verified

21}
22
23function formatHeaderSpeed(mbps) {
24 var v = parseInt(mbps, 10)
25 if (!v || v < 0) return ""
26 if (v >= 1000) return (v / 1000).toFixed(v % 1000 === 0 ? 0 : 1) + "gbit"
27 return v + "mbit"
28}
29
30function formatHeaderFreq(mhz) {
31 var v = parseFloat(mhz)

Callers 1

headerDetailFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected