MCPcopy Create free account
hub / github.com/AICoderTudou/claude-code-tudou / parseEnvLines

Function parseEnvLines

desktop/main.cjs:81–91  ·  view source on GitHub ↗
(raw)

Source from the content-addressed store, hash-verified

79}
80
81function parseEnvLines(raw) {
82 const lines = raw.split(/\r?\n/);
83 const map = new Map();
84 for (const line of lines) {
85 if (!line || line.trim().startsWith("#")) continue;
86 const idx = line.indexOf("=");
87 if (idx <= 0) continue;
88 map.set(line.slice(0, idx).trim(), line.slice(idx + 1));
89 }
90 return { lines, map };
91}
92
93function readEnvSettings() {
94 if (!fs.existsSync(ENV_PATH)) return {};

Callers 2

readEnvSettingsFunction · 0.85
writeEnvSettingsFunction · 0.85

Calls 1

setMethod · 0.80

Tested by

no test coverage detected