mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 10:27:49 +00:00
Cleanup _.isNative.
This commit is contained in:
@@ -10855,13 +10855,11 @@
|
|||||||
* // => false
|
* // => false
|
||||||
*/
|
*/
|
||||||
function isNative(value) {
|
function isNative(value) {
|
||||||
if (value == null) {
|
if (!isObject(value)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (isObjectLike(value)) {
|
var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
|
||||||
return (isHostObject(value) ? reIsNative : reIsHostCtor).test(value);
|
return pattern.test(toSource(value));
|
||||||
}
|
|
||||||
return reIsNative.test(toSource(value));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user