Bump to v4.14.2.

This commit is contained in:
John-David Dalton
2016-08-07 21:38:57 -07:00
parent cd04b44875
commit c733f930dc
81 changed files with 648 additions and 678 deletions

View File

@@ -5,8 +5,9 @@ var getTag = require('./_getTag'),
isBuffer = require('./isBuffer'),
isFunction = require('./isFunction'),
isObjectLike = require('./isObjectLike'),
isPrototype = require('./_isPrototype'),
isString = require('./isString'),
keys = require('./keys');
nativeKeys = require('./_nativeKeys');
/** `Object#toString` result references. */
var mapTag = '[object Map]',
@@ -69,12 +70,14 @@ function isEmpty(value) {
return !value.size;
}
}
var isProto = isPrototype(value);
for (var key in value) {
if (hasOwnProperty.call(value, key)) {
if (hasOwnProperty.call(value, key) &&
!(isProto && key == 'constructor')) {
return false;
}
}
return !(nonEnumShadows && keys(value).length);
return !(nonEnumShadows && nativeKeys(value).length);
}
module.exports = isEmpty;