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

1234567891011
  1. var $ = require('../internals/export');
  2. var fails = require('../internals/fails');
  3. var nativeGetOwnPropertyNames = require('../internals/object-get-own-property-names-external').f;
  4. var FAILS_ON_PRIMITIVES = fails(function () { return !Object.getOwnPropertyNames(1); });
  5. // `Object.getOwnPropertyNames` method
  6. // https://tc39.github.io/ecma262/#sec-object.getownpropertynames
  7. $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
  8. getOwnPropertyNames: nativeGetOwnPropertyNames
  9. });