Cleanup _.isNative.

This commit is contained in:
John-David Dalton
2016-04-01 19:06:36 -07:00
parent 972624297b
commit 4c8836a24a

View File

@@ -10855,13 +10855,11 @@
* // => false
*/
function isNative(value) {
if (value == null) {
if (!isObject(value)) {
return false;
}
if (isObjectLike(value)) {
return (isHostObject(value) ? reIsNative : reIsHostCtor).test(value);
}
return reIsNative.test(toSource(value));
var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
return pattern.test(toSource(value));
}
/**