object-get-own-property-names.js 482 B

1234567891011
  1. var internalObjectKeys = require('../internals/object-keys-internal');
  2. var enumBugKeys = require('../internals/enum-bug-keys');
  3. var hiddenKeys = enumBugKeys.concat('length', 'prototype');
  4. // `Object.getOwnPropertyNames` method
  5. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  6. // eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
  7. exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  8. return internalObjectKeys(O, hiddenKeys);
  9. };