frontend/.pnpm-store/v3/files/9c/9c214c1e94189ac59ff34c56c598be3aaf54f6fb849da3304f9081dd2cfe715563704f3bba85a56e60083e0f9069044589a5d50dbbd9aa27419c5bb78e35a2

12 lines
226 B
Plaintext

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