deno.land / x / lodash@4.17.19 / npm-package / _baseKeysIn.js

_baseKeysIn.js
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
var isObject = require('./isObject'), isPrototype = require('./_isPrototype'), nativeKeysIn = require('./_nativeKeysIn');
/** 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 `_.keysIn` which doesn't treat sparse arrays as dense. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */function baseKeysIn(object) { if (!isObject(object)) { return nativeKeysIn(object); } var isProto = isPrototype(object), result = [];
for (var key in object) { if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { result.push(key); } } return result;}
module.exports = baseKeysIn;
lodash

Version Info

Tagged at
3 years ago

External Dependencies

No external dependencies 🎉