Urara-Blog/node_modules/.pnpm-store/v3/files/9c/9c214c1e94189ac59ff34c56c598be3aaf54f6fb849da3304f9081dd2cfe715563704f3bba85a56e60083e0f9069044589a5d50dbbd9aa27419c5bb78e35a2
2022-08-14 01:14:53 +08:00

11 lines
226 B
Text

'use strict';
var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
module.exports = function (str) {
if (typeof str !== 'string') {
throw new TypeError('Expected a string');
}
return str.replace(matchOperatorsRe, '\\$&');
};