mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 10:07:48 +00:00
Improve regexp for reNative.
This commit is contained in:
@@ -499,7 +499,7 @@
|
|||||||
var reNative = RegExp('^' +
|
var reNative = RegExp('^' +
|
||||||
String(toString)
|
String(toString)
|
||||||
.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
|
.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
|
||||||
.replace(/toString| for [^\]]+/g, '.*?') + '$'
|
.replace(/\b(function)\b.*?(?=\\\()| for .+?(?=\\\])|\btoString\b/g, '$1.*?') + '$'
|
||||||
);
|
);
|
||||||
|
|
||||||
/** Native method shortcuts */
|
/** Native method shortcuts */
|
||||||
|
|||||||
Reference in New Issue
Block a user