Bump to v3.10.0.

This commit is contained in:
John-David Dalton
2015-12-16 17:52:15 -08:00
parent 32393ae520
commit 75c633becb
121 changed files with 1504 additions and 1168 deletions

View File

@@ -1,7 +1,4 @@
define(['../string/escapeRegExp', '../internal/isObjectLike'], function(escapeRegExp, isObjectLike) {
/** `Object#toString` result references. */
var funcTag = '[object Function]';
define(['./isFunction', '../internal/isObjectLike'], function(isFunction, isObjectLike) {
/** Used to detect host constructors (Safari > 5). */
var reIsHostCtor = /^\[object .+?Constructor\]$/;
@@ -15,15 +12,9 @@ define(['../string/escapeRegExp', '../internal/isObjectLike'], function(escapeRe
/** 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.*?') + '$'
);
@@ -47,7 +38,7 @@ define(['../string/escapeRegExp', '../internal/isObjectLike'], function(escapeRe
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);