Remove semicolons.

This commit is contained in:
John-David Dalton
2017-02-04 23:50:10 -08:00
parent f3a8e55e70
commit 6cb3460fce
452 changed files with 4261 additions and 4261 deletions

View File

@@ -1,11 +1,11 @@
import toString from './toString.js';
import toString from './toString.js'
/**
* Used to match `RegExp`
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
*/
const reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
const reHasRegExpChar = RegExp(reRegExpChar.source);
const reRegExpChar = /[\\^$.*+?()[\]{}|]/g
const reHasRegExpChar = RegExp(reRegExpChar.source)
/**
* Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
@@ -18,14 +18,14 @@ const reHasRegExpChar = RegExp(reRegExpChar.source);
* @see escape, escapeRegExp, unescape
* @example
*
* escapeRegExp('[lodash](https://lodash.com/)');
* escapeRegExp('[lodash](https://lodash.com/)')
* // => '\[lodash\]\(https://lodash\.com/\)'
*/
function escapeRegExp(string) {
string = toString(string);
string = toString(string)
return (string && reHasRegExpChar.test(string))
? string.replace(reRegExpChar, '\\$&')
: string;
: string
}
export default escapeRegExp;
export default escapeRegExp