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

Function parseKeyValue

shell/plugins/panels/power/Model.js:12–21  ·  view source on GitHub ↗
(raw)

Source from the content-addressed store, hash-verified

10}
11
12function parseKeyValue(raw) {
13 var next = {}
14 var lines = String(raw || "").split("\n")
15 for (var i = 0; i < lines.length; i++) {
16 var idx = lines[i].indexOf("\t")
17 if (idx <= 0) continue
18 next[lines[i].substring(0, idx)] = lines[i].substring(idx + 1).trim()
19 }
20 return next
21}
22
23function parseProfiles(raw, previousIndex) {
24 var lines = String(raw || "").split("\n")

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected