own-keys.js 616 B

1234567891011
  1. var getBuiltIn = require('../internals/get-built-in');
  2. var getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');
  3. var getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');
  4. var anObject = require('../internals/an-object');
  5. // all object keys, includes non-enumerable and symbols
  6. module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
  7. var keys = getOwnPropertyNamesModule.f(anObject(it));
  8. var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  9. return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
  10. };