MCPcopy
hub / github.com/webpack/webpack / quoteMeta

Function quoteMeta

test/StatsTestCases.basictest.js:20–20  ·  test/StatsTestCases.basictest.js::quoteMeta
(str)

Source from the content-addressed store, hash-verified

18 * @returns {string} Escaped string
19 */
20const quoteMeta = (str) => str.replace(/[-[\]\\/{}()*+?.^$|]/g, class="st">"\\$&");
21
22const base = path.join(__dirname, class="st">"statsCases");
23const outputBase = path.join(__dirname, class="st">"js", class="st">"stats");

Callers 1

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected