MCPcopy Create free account
hub / github.com/freeCodeCamp/freeCodeCamp / getCurriculumStructure

Function getCurriculumStructure

curriculum/src/file-handler.ts:105–115  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

103}
104
105export function getCurriculumStructure() {
106 const curriculumPath = resolve(STRUCTURE_DIR, 'curriculum.json');
107 if (!existsSync(curriculumPath)) {
108 throw new Error(`Curriculum file not found: ${curriculumPath}`);
109 }
110
111 return JSON.parse(readFileSync(curriculumPath, 'utf8')) as {
112 superblocks: SuperBlocks[];
113 certifications: string[];
114 };
115}
116
117export function getBlockStructurePath(block: string) {
118 return resolve(BLOCK_STRUCTURE_DIR, `${block}.json`);

Callers 4

renameBlockFunction · 0.90
getSuperblocksFunction · 0.85
parseCurriculumStructureFunction · 0.85

Calls

no outgoing calls

Tested by 1