Bump to v4.16.5.

This commit is contained in:
John-David Dalton
2016-10-30 20:08:19 -07:00
parent 6778141728
commit be1e9a3170
113 changed files with 277 additions and 335 deletions

View File

@@ -1,3 +1,4 @@
import baseGetTag from './_baseGetTag.js';
import getPrototype from './_getPrototype.js';
import isObjectLike from './isObjectLike.js';
@@ -17,13 +18,6 @@ var hasOwnProperty = objectProto.hasOwnProperty;
/** Used to infer the `Object` constructor. */
var objectCtorString = funcToString.call(Object);
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
/**
* Checks if `value` is a plain object, that is, an object created by the
* `Object` constructor or one with a `[[Prototype]]` of `null`.
@@ -53,7 +47,7 @@ var objectToString = objectProto.toString;
* // => true
*/
function isPlainObject(value) {
if (!isObjectLike(value) || objectToString.call(value) != objectTag) {
if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
return false;
}
var proto = getPrototype(value);
@@ -61,8 +55,8 @@ function isPlainObject(value) {
return true;
}
var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
return (typeof Ctor == 'function' &&
Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);
return typeof Ctor == 'function' && Ctor instanceof Ctor &&
funcToString.call(Ctor) == objectCtorString;
}
export default isPlainObject;