UNPKG

535 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.escapeRegExp = void 0;
4/**
5 * Lodash <https://lodash.com/>
6 * Released under MIT license <https://lodash.com/license>
7 */
8const reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
9const reHasRegExpChar = RegExp(reRegExpChar.source);
10function escapeRegExp(string = '') {
11 return string && reHasRegExpChar.test(string)
12 ? string.replace(reRegExpChar, '\\$&')
13 : string;
14}
15exports.escapeRegExp = escapeRegExp;
16//# sourceMappingURL=escapeRegExp.js.map
\No newline at end of file