es.reflect.get-own-property-descriptor.js 581 B

123456789101112
  1. var $ = require('../internals/export');
  2. var DESCRIPTORS = require('../internals/descriptors');
  3. var anObject = require('../internals/an-object');
  4. var getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');
  5. // `Reflect.getOwnPropertyDescriptor` method
  6. // https://tc39.es/ecma262/#sec-reflect.getownpropertydescriptor
  7. $({ target: 'Reflect', stat: true, sham: !DESCRIPTORS }, {
  8. getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) {
  9. return getOwnPropertyDescriptorModule.f(anObject(target), propertyKey);
  10. }
  11. });