Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.js 226B

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. };