MCPcopy Create free account
hub / github.com/Mrinank-Bhowmick/python-beginner-projects / findReadme

Function findReadme

web/scripts/gen-catalog.mjs:136–141  ·  view source on GitHub ↗
(dir)

Source from the content-addressed store, hash-verified

134 .replace(/^-+|-+$/g, "") || "project";
135
136function findReadme(dir) {
137 for (const f of fs.readdirSync(dir)) {
138 if (/^readme\.md$/i.test(f)) return path.join(dir, f);
139 }
140 return null;
141}
142
143function findMainPy(dir, folder) {
144 const top = fs.readdirSync(dir, { withFileTypes: true });

Callers 1

gen-catalog.mjsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected