mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 17:07:49 +00:00
Bump to v3.7.0.
This commit is contained in:
@@ -5,7 +5,7 @@ import isObjectLike from '../internal/isObjectLike';
|
||||
var funcTag = '[object Function]';
|
||||
|
||||
/** Used to detect host constructors (Safari > 5). */
|
||||
var reHostCtor = /^\[object .+?Constructor\]$/;
|
||||
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
||||
|
||||
/** Used for native method references. */
|
||||
var objectProto = Object.prototype;
|
||||
@@ -20,7 +20,7 @@ var fnToString = Function.prototype.toString;
|
||||
var objToString = objectProto.toString;
|
||||
|
||||
/** Used to detect if a method is native. */
|
||||
var reNative = RegExp('^' +
|
||||
var reIsNative = RegExp('^' +
|
||||
escapeRegExp(objToString)
|
||||
.replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
||||
);
|
||||
@@ -46,9 +46,9 @@ function isNative(value) {
|
||||
return false;
|
||||
}
|
||||
if (objToString.call(value) == funcTag) {
|
||||
return reNative.test(fnToString.call(value));
|
||||
return reIsNative.test(fnToString.call(value));
|
||||
}
|
||||
return isObjectLike(value) && reHostCtor.test(value);
|
||||
return isObjectLike(value) && reIsHostCtor.test(value);
|
||||
}
|
||||
|
||||
export default isNative;
|
||||
|
||||
Reference in New Issue
Block a user