mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 02:47:50 +00:00
Implement a more robust native function detection. [Krinkle]
Former-commit-id: 8d915a0dd12f08e1860122189b57b12382efb144
This commit is contained in:
@@ -46,7 +46,9 @@
|
|||||||
var reInterpolateDelimiter = /<%=([\s\S]+?)%>/g;
|
var reInterpolateDelimiter = /<%=([\s\S]+?)%>/g;
|
||||||
|
|
||||||
/** Used to detect if a method is native */
|
/** Used to detect if a method is native */
|
||||||
var reNative = /\{\s*\[native code\]\s*\}/;
|
var reNative = RegExp('^' + ({}.valueOf + '')
|
||||||
|
.replace(/[.*+?^=!:${}()|[\]\/\\]/g, '\\$&')
|
||||||
|
.replace(/valueOf/g, '.+?') + '$')
|
||||||
|
|
||||||
/** Used to match tokens in template text */
|
/** Used to match tokens in template text */
|
||||||
var reToken = /__token__(\d+)/g;
|
var reToken = /__token__(\d+)/g;
|
||||||
|
|||||||
Reference in New Issue
Block a user