1 | var $ = require('../internals/export');
|
2 | var fails = require('../internals/fails');
|
3 | var toIndexedObject = require('../internals/to-indexed-object');
|
4 | var nativeGetOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;
|
5 | var DESCRIPTORS = require('../internals/descriptors');
|
6 |
|
7 | var FAILS_ON_PRIMITIVES = fails(function () { nativeGetOwnPropertyDescriptor(1); });
|
8 | var FORCED = !DESCRIPTORS || FAILS_ON_PRIMITIVES;
|
9 |
|
10 |
|
11 |
|
12 | $({ target: 'Object', stat: true, forced: FORCED, sham: !DESCRIPTORS }, {
|
13 | getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {
|
14 | return nativeGetOwnPropertyDescriptor(toIndexedObject(it), key);
|
15 | }
|
16 | });
|