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

Function readMarkdownFiles

scripts/unharness.js:37–47  ·  view source on GitHub ↗
(dir, skip = [])

Source from the content-addressed store, hash-verified

35 if (!arg.startsWith('--')) options.projectRoot = path.resolve(arg);
36 }
37 return options;
38}
39
40function readMarkdownFiles(dir, skip = []) {
41 if (!fs.existsSync(dir)) return [];
42 const results = [];
43 for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
44 if (!entry.isFile() || !entry.name.endsWith('.md')) continue;
45 if (skip.some(s => entry.name.includes(s))) continue;
46 const content = fs.readFileSync(path.join(dir, entry.name), 'utf8').trim();
47 if (content) results.push({ name: entry.name, content });
48 }
49 return results;
50}

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected