MCPcopy
hub / github.com/lodash/lodash / baseKeys

Function baseKeys

lodash.js:3529–3540  ·  view source on GitHub ↗

* 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.

(object)

Source from the content-addressed store, hash-verified

3527 * @returns {Array} Returns the array of property names.
3528 */
3529 function baseKeys(object) {
3530 if (!isPrototype(object)) {
3531 return nativeKeys(object);
3532 }
3533 var result = [];
3534 for (var key in Object(object)) {
3535 if (hasOwnProperty.call(object, key) && key != 'constructor') {
3536 result.push(key);
3537 }
3538 }
3539 return result;
3540 }
3541
3542 /**
3543 * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.

Callers 3

sizeFunction · 0.85
isEmptyFunction · 0.85
keysFunction · 0.85

Calls 1

isPrototypeFunction · 0.85

Tested by

no test coverage detected