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

Function createCertLookup

api/src/routes/protected/certificate.ts:112–121  ·  view source on GitHub ↗
(
  challenges: ReturnType<typeof getChallenges>
)

Source from the content-addressed store, hash-verified

110 * @returns A record mapping each Certification to an object with id, tests and challengeType.
111 */
112export function createCertLookup(
113 challenges: ReturnType<typeof getChallenges>
114): CertLookup {
115 const certLookup = {} as CertLookup;
116
117 for (const cert of Object.values(Certification)) {
118 certLookup[cert] = getCertBySlug(cert, challenges);
119 }
120 return certLookup;
121}
122
123function getUserIsCertMap(user: Partial<CertificationFlags>) {
124 const {

Callers 2

Calls 1

getCertBySlugFunction · 0.85

Tested by

no test coverage detected