package.dist.util.escapeRegex.js.map Maven / Gradle / Ivy
{"version":3,"file":"escapeRegex.js","sourceRoot":"","sources":["../../src/util/escapeRegex.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,GAAG,CAAC,IAAY,EAAE,EAAE;IACpC,OAAO,IAAI,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;AACpD,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["/**\n * Escapes a regular expression text so that it can be used in a regular expression.\n *\n * @param { string } text the string to be interpreted literally\n * @returns { string } the escaped string\n */\nconst escapeRegex = (text: string) => {\n\treturn text.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n};\n\nexport default escapeRegex;\n"]}