1 var isObject = require('./isObject'),
2 isPrototype = require('./_isPrototype'),
3 nativeKeysIn = require('./_nativeKeysIn');
5 /** Used for built-in method references. */
6 var objectProto = Object.prototype;
8 /** Used to check objects for own properties. */
9 var hasOwnProperty = objectProto.hasOwnProperty;
12 * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
15 * @param {Object} object The object to query.
16 * @returns {Array} Returns the array of property names.
18 function baseKeysIn(object) {
19 if (!isObject(object)) {
20 return nativeKeysIn(object);
22 var isProto = isPrototype(object),
25 for (var key in object) {
26 if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
33 module.exports = baseKeysIn;