MCPcopy
hub / github.com/webpack/webpack / escapeAnsi

Function escapeAnsi

test/Compiler.test.js:1152–1157  ·  test/Compiler.test.js::escapeAnsi
(/** @type {string} */ stringRaw)

Source from the content-addressed store, hash-verified

1150 });
1151
1152 const escapeAnsi = (/** @type {string} */ stringRaw) =>
1153 stringRaw
1154 .replace(/\u001B\[1m\u001B\[([0-9;]*)m/g, class="st">"<CLR=$1,BOLD>")
1155 .replace(/\u001B\[1m/g, class="st">"<CLR=BOLD>")
1156 .replace(/\u001B\[39m\u001B\[22m/g, class="st">"</CLR>")
1157 .replace(/\u001B\[([0-9;]*)m/g, class="st">"<CLR=$1>");
1158 class MyPlugin {
1159 /** @param {import(class="st">"../").Compiler} compiler webpack compiler */
1160 apply(compiler) {

Callers 1

Compiler.test.jsFile · 0.85

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected