mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 01:17:50 +00:00
Add test for _.escapeRegExp with eval and Function.
This commit is contained in:
@@ -114,9 +114,9 @@
|
||||
|
||||
/**
|
||||
* Used to match `RegExp` special characters.
|
||||
* See this [article on `RegExp` characters](http://www.regular-expressions.info/characters.html#special)
|
||||
* for more details. In addition the forward slash is escaped to allow for
|
||||
* easier `eval` and `Function` compilation use.
|
||||
* See this [article on `RegExp` special characters](http://www.regular-expressions.info/characters.html#special)
|
||||
* for more details. In addition to special characters the forward slash is
|
||||
* escaped to allow for easier `eval` use and `Function` compilation.
|
||||
*/
|
||||
var reRegExpChars = /[.*+?^${}()|[\]\/\\]/g,
|
||||
reHasRegExpChars = RegExp(reRegExpChars.source);
|
||||
|
||||
Reference in New Issue
Block a user