Initial commit
[yaffs-website] / node_modules / grunt-contrib-watch / node_modules / globule / node_modules / lodash / _getSymbolsIn.js
1 var arrayPush = require('./_arrayPush'),
2     getPrototype = require('./_getPrototype'),
3     getSymbols = require('./_getSymbols'),
4     stubArray = require('./stubArray');
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 symbol properties
11  * of `object`.
12  *
13  * @private
14  * @param {Object} object The object to query.
15  * @returns {Array} Returns the array of symbols.
16  */
17 var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
18   var result = [];
19   while (object) {
20     arrayPush(result, getSymbols(object));
21     object = getPrototype(object);
22   }
23   return result;
24 };
25
26 module.exports = getSymbolsIn;