Bump to v4.8.0.

This commit is contained in:
John-David Dalton
2016-04-01 23:29:18 -07:00
parent ce0b51888c
commit 723c02dbfa
63 changed files with 222 additions and 149 deletions

View File

@@ -1,8 +1,12 @@
import isFunction from './isFunction';
import isHostObject from './_isHostObject';
import isObjectLike from './isObjectLike';
import isObject from './isObject';
import toSource from './_toSource';
/** Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). */
/**
* Used to match `RegExp`
* [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns).
*/
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
/** Used to detect host constructors (Safari). */
@@ -42,14 +46,11 @@ var reIsNative = RegExp('^' +
* // => false
*/
function isNative(value) {
if (value == null) {
if (!isObject(value)) {
return false;
}
if (isFunction(value)) {
return reIsNative.test(funcToString.call(value));
}
return isObjectLike(value) &&
(isHostObject(value) ? reIsNative : reIsHostCtor).test(value);
var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
return pattern.test(toSource(value));
}
export default isNative;