Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

25 rader
754 B

3 år sedan
  1. var arrayPush = require('./_arrayPush'),
  2. getPrototype = require('./_getPrototype'),
  3. getSymbols = require('./_getSymbols'),
  4. stubArray = require('./stubArray');
  5. /* Built-in method references for those with the same name as other `lodash` methods. */
  6. var nativeGetSymbols = Object.getOwnPropertySymbols;
  7. /**
  8. * Creates an array of the own and inherited enumerable symbols of `object`.
  9. *
  10. * @private
  11. * @param {Object} object The object to query.
  12. * @returns {Array} Returns the array of symbols.
  13. */
  14. var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
  15. var result = [];
  16. while (object) {
  17. arrayPush(result, getSymbols(object));
  18. object = getPrototype(object);
  19. }
  20. return result;
  21. };
  22. module.exports = getSymbolsIn;