es.object.get-own-property-names.js 563 B

123456789101112
  1. var $ = require('../internals/export');
  2. var fails = require('../internals/fails');
  3. var getOwnPropertyNames = require('../internals/object-get-own-property-names-external').f;
  4. // eslint-disable-next-line es/no-object-getownpropertynames -- required for testing
  5. var FAILS_ON_PRIMITIVES = fails(function () { return !Object.getOwnPropertyNames(1); });
  6. // `Object.getOwnPropertyNames` method
  7. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  8. $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
  9. getOwnPropertyNames: getOwnPropertyNames
  10. });