main
Last change
on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
752 bytes
|
Line | |
---|
1 | import arrayPush from './_arrayPush.js';
|
---|
2 | import getPrototype from './_getPrototype.js';
|
---|
3 | import getSymbols from './_getSymbols.js';
|
---|
4 | import stubArray from './stubArray.js';
|
---|
5 |
|
---|
6 | /* Built-in method references for those with the same name as other `lodash` methods. */
|
---|
7 | var nativeGetSymbols = Object.getOwnPropertySymbols;
|
---|
8 |
|
---|
9 | /**
|
---|
10 | * Creates an array of the own and inherited enumerable symbols 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 = !nativeGetSymbols ? stubArray : 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;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.