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

Function getModules

tools/challenge-helper-scripts/create-project.ts:255–267  ·  view source on GitHub ↗
(superBlock: string, chapterName: string)

Source from the content-addressed store, hash-verified

253}
254
255async function getModules(superBlock: string, chapterName: string) {
256 const blockMetaFile = await fs.readFile(
257 '../../curriculum/structure/superblocks/' + superBlock + '.json',
258 { encoding: 'utf8' }
259 );
260 const blockMetaData = JSON.parse(
261 blockMetaFile
262 ) as ChapterModuleSuperblockStructure;
263 const modifiedChapter = blockMetaData.chapters.find(
264 x => x.dashedName === chapterName
265 );
266 return modifiedChapter?.modules;
267}
268
269void getAllBlocks()
270 .then(async existingBlocks => {

Callers 1

create-project.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected