1 | import arrayPush from './_arrayPush';
|
2 | import getPrototype from './_getPrototype';
|
3 | import getSymbols from './_getSymbols';
|
4 |
|
5 | /** Built-in value references. */
|
6 | var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
7 |
|
8 | /**
|
9 | * Creates an array of the own and inherited enumerable symbol properties
|
10 | * of `object`.
|
11 | *
|
12 | * @private
|
13 | * @param {Object} object The object to query.
|
14 | * @returns {Array} Returns the array of symbols.
|
15 | */
|
16 | var getSymbolsIn = !getOwnPropertySymbols ? getSymbols : function(object) {
|
17 | var result = [];
|
18 | while (object) {
|
19 | arrayPush(result, getSymbols(object));
|
20 | object = getPrototype(object);
|
21 | }
|
22 | return result;
|
23 | };
|
24 |
|
25 | export default getSymbolsIn;
|