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

Function quoteMeta

lib/util/compileBooleanMatcher.js:13–13  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

11 * @returns {string} quoted meta
12 */
13const quoteMeta = (str) => str.replace(/[-[\]\\/{}()*+?.^$|]/g, "\\$&");
14
15/**
16 * Quote meta in char class.

Callers 1

itemsToRegexpFunction · 0.70

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected