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

Function parseKeyValue

shell/plugins/panels/network/Model.js:114–127  ·  view source on GitHub ↗
(raw)

Source from the content-addressed store, hash-verified

112}
113
114function parseKeyValue(raw) {
115 var next = {}
116 var lines = String(raw || "").split("\n")
117 for (var i = 0; i < lines.length; i++) {
118 var line = lines[i]
119 if (!line) continue
120 var idx = line.indexOf("\t")
121 if (idx === -1) continue
122 var key = line.substring(0, idx)
123 var value = line.substring(idx + 1)
124 next[key] = key === "ssid" ? decodeIwSsid(value) : value.trim()
125 }
126 return next
127}
128
129function throughputState(previous, next, now) {
130 var prev = previous || {}

Callers 1

parseBandStatusFunction · 0.70

Calls 1

decodeIwSsidFunction · 0.85

Tested by

no test coverage detected