astro-ghostcms/.pnpm-store/v3/files/b5/0cf5a1c8375d7c74e26705197e7...

16 lines
535 B
Plaintext
Raw Normal View History

2024-02-14 14:10:47 +00:00
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.escapeRegExp = void 0;
/**
* Lodash <https://lodash.com/>
* Released under MIT license <https://lodash.com/license>
*/
const reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
const reHasRegExpChar = RegExp(reRegExpChar.source);
function escapeRegExp(string = '') {
return string && reHasRegExpChar.test(string)
? string.replace(reRegExpChar, '\\$&')
: string;
}
exports.escapeRegExp = escapeRegExp;
//# sourceMappingURL=escapeRegExp.js.map