mirror of
https://github.com/Sevichecc/Urara-Blog.git
synced 2025-05-02 16:39:29 +08:00
16 lines
No EOL
535 B
Text
16 lines
No EOL
535 B
Text
"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 |