'use strict';
var reRegExpChar = /[\\^$.*+?\-()[\]{}|]/g;
var reHasRegExpChar = RegExp(reRegExpChar.source);
function escapeRegExp(string) {
return string && reHasRegExpChar.test(string) ? string.replace(reRegExpChar, '\\$&') : string || '';
}
module.exports = escapeRegExp;