1 | var isObject = require('./isObject'),
|
2 | isPrototype = require('./_isPrototype'),
|
3 | nativeKeysIn = require('./_nativeKeysIn');
|
4 |
|
5 |
|
6 | var objectProto = Object.prototype;
|
7 |
|
8 |
|
9 | var hasOwnProperty = objectProto.hasOwnProperty;
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 | function baseKeysIn(object) {
|
19 | if (!isObject(object)) {
|
20 | return nativeKeysIn(object);
|
21 | }
|
22 | var isProto = isPrototype(object),
|
23 | result = [];
|
24 |
|
25 | for (var key in object) {
|
26 | if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
|
27 | result.push(key);
|
28 | }
|
29 | }
|
30 | return result;
|
31 | }
|
32 |
|
33 | module.exports = baseKeysIn;
|