1 | import Reflect from './_Reflect';
|
2 | import iteratorToArray from './_iteratorToArray';
|
3 |
|
4 |
|
5 | var objectProto = Object.prototype;
|
6 |
|
7 |
|
8 | var enumerate = Reflect ? Reflect.enumerate : undefined,
|
9 | propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 | function baseKeysIn(object) {
|
20 | object = object == null ? object : Object(object);
|
21 |
|
22 | var result = [];
|
23 | for (var key in object) {
|
24 | result.push(key);
|
25 | }
|
26 | return result;
|
27 | }
|
28 |
|
29 |
|
30 | if (enumerate && !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf')) {
|
31 | baseKeysIn = function(object) {
|
32 | return iteratorToArray(enumerate(object));
|
33 | };
|
34 | }
|
35 |
|
36 | export default baseKeysIn;
|