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

Function createMetaJson

tools/challenge-helper-scripts/create-quiz.ts:68–81  ·  view source on GitHub ↗
(
  block: string,
  title: string,
  helpCategory: string,
  challengeId: ObjectId
)

Source from the content-addressed store, hash-verified

66}
67
68async function createMetaJson(
69 block: string,
70 title: string,
71 helpCategory: string,
72 challengeId: ObjectId
73) {
74 const newMeta = getBaseMeta('Quiz');
75 newMeta.dashedName = block;
76 newMeta.helpCategory = helpCategory;
77
78 newMeta.challengeOrder = [{ id: challengeId.toString(), title: title }];
79
80 await writeBlockStructure(block, newMeta);
81}
82
83async function createQuizChallenge({
84 block,

Callers 1

createQuizFunction · 0.70

Calls 2

writeBlockStructureFunction · 0.90
getBaseMetaFunction · 0.85

Tested by

no test coverage detected