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

Function transform

packages/challenge-builder/src/transformers.js:395–402  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

393const getHtmlTranspiler = scriptOptions =>
394 async function (file) {
395 const transform = async contentDocument => {
396 const documentElement = contentDocument.documentElement;
397 await Promise.all([
398 transformSASS(documentElement),
399 transformScript(documentElement, scriptOptions)
400 ]);
401 return documentElement.innerHTML;
402 };
403
404 const contents = await parseAndTransform(transform, file.contents);
405 return transformContents(() => contents, file);

Callers 1

parseAndTransformFunction · 0.85

Calls 2

transformSASSFunction · 0.85
transformScriptFunction · 0.85

Tested by

no test coverage detected