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

Function parseJson

scripts/claude-install.js:32–40  ·  view source on GitHub ↗
(stdout)

Source from the content-addressed store, hash-verified

30 return /\s/.test(text) ? `"${text.replace(/"/g, '\\"')}"` : text;
31}
32
33function display(command, args) {
34 return [command, ...args].map(q).join(' ');
35}
36
37function parseJson(stdout) {
38 const text = String(stdout || '').trim();
39 if (!text.startsWith('{') && !text.startsWith('[')) return null;
40 try {
41 return JSON.parse(text);
42 } catch {
43 return null;

Callers 1

runStepFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected