MCPcopy Create free account
hub / github.com/cesanta/mongoose / inlineJs

Function inlineJs

resources/html2c.js:80–85  ·  view source on GitHub ↗
(match, baseDir)

Source from the content-addressed store, hash-verified

78}
79
80async function inlineJs(match, baseDir) {
81 const src = attr(match, 'src');
82 if (!src) return match;
83 const js = await readAsset(src, 'utf8', baseDir);
84 return `<script>${js}</script>`;
85}
86
87async function inlineImg(match, baseDir) {
88 const src = attr(match, 'src');

Callers 1

processHtmlFunction · 0.85

Calls 2

attrFunction · 0.85
readAssetFunction · 0.85

Tested by

no test coverage detected