MCPcopy
hub / github.com/braziljs/eloquente-javascript / prepareHTML

Function prepareHTML

src/chapter_info.mjs:194–196  ·  view source on GitHub ↗
(code, include)

Source from the content-addressed store, hash-verified

192 process.exit(1);
193
194function prepareHTML(code, include) {
195 return "<!doctype html>\n" + (include || []).map(s => "<script src=\"" + s + "\"></script>\n").join("") + "\n" + code;
196}
197
198function guessType(code) {
199 return /^[\s\w\n:]*</.test(code) ? "html" : "js";

Callers 3

addSolutionFunction · 0.85
getStartCodeFunction · 0.85
chapterZipFileFunction · 0.85

Calls 2

joinMethod · 0.45
mapMethod · 0.45

Tested by

no test coverage detected