MCPcopy
hub / github.com/webpack/webpack / toBomFreeString

Function toBomFreeString

lib/typescript/TypeScriptPlugin.js:142–146  ·  view source on GitHub ↗
(source)

Source from the content-addressed store, hash-verified

140 * @returns {string} UTF-8 string without BOM
141 */
142const toBomFreeString = (source) => {
143 const text = Buffer.isBuffer(source) ? source.toString("utf8") : source;
144 const stripped = removeBOM(text);
145 return typeof stripped === "string" ? stripped : stripped.toString("utf8");
146};
147
148class TypeScriptPlugin {
149 /**

Callers 1

_processResultMethod · 0.85

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected