Bump to v4.14.2.

This commit is contained in:
John-David Dalton
2016-08-07 21:23:34 -07:00
parent 6d4f76888f
commit cbf5cb1162
74 changed files with 233 additions and 256 deletions

View File

@@ -1,16 +1,30 @@
import overArg from './_overArg.js';
import isPrototype from './_isPrototype.js';
import nativeKeys from './_nativeKeys.js';
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeKeys = Object.keys;
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* The base implementation of `_.keys` which doesn't skip the constructor
* property of prototypes or treat sparse arrays as dense.
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
*/
var baseKeys = overArg(nativeKeys, Object);
function baseKeys(object) {
if (!isPrototype(object)) {
return nativeKeys(object);
}
var result = [];
for (var key in Object(object)) {
if (hasOwnProperty.call(object, key) && key != 'constructor') {
result.push(key);
}
}
return result;
}
export default baseKeys;