MCPcopy
hub / github.com/webpack/webpack / dataUri

Method dataUri

lib/html/HtmlParser.js:975–976  ·  view source on GitHub ↗
(mime, text)

Source from the content-addressed store, hash-verified

973 * @returns {string} a `data:` request for the text
974 */
975 const dataUri = (mime, text) =>
976 `data:${mime};base64,${Buffer.from(text, "utf8").toString("base64")}`;
977
978 /**
979 * @param {ConstDependency | HtmlSourceDependency | HtmlEntryDependency | HtmlInlineStyleDependency | HtmlInlineScriptDependency | HtmlInlineHtmlDependency} dep dependency

Callers

nothing calls this directly

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected