MCPcopy Create free account
hub / github.com/SethGammon/Citadel / parseKeyValueLines

Function parseKeyValueLines

core/project/load-project-spec.js:16–28  ·  view source on GitHub ↗
(lines)

Source from the content-addressed store, hash-verified

14]);
15
16function parseKeyValueLines(lines) {
17 const obj = {};
18 for (const line of lines) {
19 const trimmed = line.trim();
20 if (!trimmed) continue;
21 const colonIndex = trimmed.indexOf(':');
22 if (colonIndex === -1) continue;
23 const key = trimmed.slice(0, colonIndex).trim().toLowerCase();
24 const value = trimmed.slice(colonIndex + 1).trim();
25 if (key && value) obj[key] = value;
26 }
27 return obj;
28}
29
30function parseBulletLines(lines) {
31 return lines

Callers 1

parseProjectSpecFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected