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

Function getChallengesForLang

curriculum/src/get-challenges.ts:14–24  ·  view source on GitHub ↗
(
  lang: string,
  filters: Filter = curriculumFilter // default to global curriculum filter, but allow override (e.g. when testing specific blocks)
)

Source from the content-addressed store, hash-verified

12const access = promisify(_access);
13
14export async function getChallengesForLang(
15 lang: string,
16 filters: Filter = curriculumFilter // default to global curriculum filter, but allow override (e.g. when testing specific blocks)
17) {
18 const invalidLang = !curriculumLangs.includes(lang);
19 if (invalidLang)
20 throw Error(`${lang} is not an accepted language.
21Accepted languages are ${curriculumLangs.join(', ')}`);
22
23 return buildCurriculum(lang, filters);
24}
25
26export async function hasEnglishSource(
27 basePath: string,

Callers 4

getChallengesFunction · 0.85
getChallengesFunction · 0.85

Calls 1

buildCurriculumFunction · 0.85

Tested by

no test coverage detected