9c214c1e94189ac59ff34c56c598be3aaf54f6fb849da3304f9081dd2cfe715563704f3bba85a56e60083e0f9069044589a5d50dbbd9aa27419c5bb78e35a2 226 B

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