Bump to v3.10.0.

This commit is contained in:
jdalton
2015-06-14 22:21:58 -07:00
parent 6ee2b9a7b8
commit 4bd2890bbd
121 changed files with 777 additions and 649 deletions

View File

@@ -1,9 +1,6 @@
import escapeRegExp from '../string/escapeRegExp';
import isFunction from './isFunction';
import isObjectLike from '../internal/isObjectLike';
/** `Object#toString` result references. */
var funcTag = '[object Function]';
/** Used to detect host constructors (Safari > 5). */
var reIsHostCtor = /^\[object .+?Constructor\]$/;
@@ -16,15 +13,9 @@ var fnToString = Function.prototype.toString;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)
* of values.
*/
var objToString = objectProto.toString;
/** Used to detect if a method is native. */
var reIsNative = RegExp('^' +
escapeRegExp(fnToString.call(hasOwnProperty))
fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
);
@@ -48,7 +39,7 @@ function isNative(value) {
if (value == null) {
return false;
}
if (objToString.call(value) == funcTag) {
if (isFunction(value)) {
return reIsNative.test(fnToString.call(value));
}
return isObjectLike(value) && reIsHostCtor.test(value);