MCPcopy Index your code
hub / github.com/freeCodeCamp/freeCodeCamp / getSuperblockStructure

Function getSuperblockStructure

curriculum/src/file-handler.ts:219–230  ·  view source on GitHub ↗
(superblockFilename: string)

Source from the content-addressed store, hash-verified

217}
218
219export function getSuperblockStructure(superblockFilename: string) {
220 const superblockPath = getSuperblockStructurePath(superblockFilename);
221
222 if (!existsSync(superblockPath)) {
223 throw Error(`Superblock file not found: ${superblockPath}`);
224 }
225
226 return JSON.parse(readFileSync(superblockPath, 'utf8')) as {
227 blocks?: string[];
228 chapters?: Chapter[];
229 };
230}
231
232export function getSuperblockStructurePath(superblockFilename: string) {
233 return resolve(STRUCTURE_DIR, 'superblocks', `${superblockFilename}.json`);

Callers 8

renameBlockFunction · 0.90
getBlockMetadataFunction · 0.85
addSuperblockStructureFunction · 0.85

Calls 1

Tested by

no test coverage detected