1
0
mirror of https://github.com/thangisme/notes.git synced 2024-10-31 22:17:25 -04:00
notes/node_modules/lodash/_getSymbolsIn.js
Patrick Marsceill b7b0d0d7bf
Initial commit
2017-03-09 13:16:08 -05:00

26 lines
754 B
JavaScript

var arrayPush = require('./_arrayPush'),
getPrototype = require('./_getPrototype'),
getSymbols = require('./_getSymbols'),
stubArray = require('./stubArray');
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeGetSymbols = Object.getOwnPropertySymbols;
/**
* Creates an array of the own and inherited enumerable symbols of `object`.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of symbols.
*/
var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
var result = [];
while (object) {
arrayPush(result, getSymbols(object));
object = getPrototype(object);
}
return result;
};
module.exports = getSymbolsIn;