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

Function readJsonIfExists

core/codex/native-integrations.js:50–55  ·  view source on GitHub ↗
(filePath, options = {})

Source from the content-addressed store, hash-verified

48}
49
50function readJsonIfExists(filePath, options = {}) {
51 if (!fs.existsSync(filePath)) return null;
52 const raw = fs.readFileSync(filePath, 'utf8');
53 const json = options.allowLineComment ? raw.replace(/^\/\/.*\n/, '') : raw;
54 return JSON.parse(json);
55}
56
57function createAutomationPlan(options = {}) {
58 const projectRoot = path.resolve(options.projectRoot || process.cwd());

Callers 1

checkCodexReadinessFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected