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