MCPcopy Create free account
hub / github.com/Open-Quant/openquant / parseFrontmatter

Function parseFrontmatter

docs-site/scripts/check-content-schema.mjs:21–32  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

19 */
20const STATUS_DATE_FIELD = {
21 generated: 'last_generated',
22 draft: null,
23 reviewed: 'last_validated',
24 validated: 'last_validated',
25};
26const STATUSES = Object.keys(STATUS_DATE_FIELD);
27const DATE_FIELDS = ['last_generated', 'last_validated'];
28
29function walk(dir) {
30 const files = [];
31 for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
32 const full = path.join(dir, entry.name);
33 if (entry.isDirectory()) {
34 files.push(...walk(full));
35 continue;

Callers 1

Calls 1

splitMethod · 0.80

Tested by

no test coverage detected