main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
738 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | 'use strict';
|
---|
| 2 | var $ = require('../internals/export');
|
---|
| 3 | var fails = require('../internals/fails');
|
---|
| 4 | var toIndexedObject = require('../internals/to-indexed-object');
|
---|
| 5 | var nativeGetOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;
|
---|
| 6 | var DESCRIPTORS = require('../internals/descriptors');
|
---|
| 7 |
|
---|
| 8 | var FORCED = !DESCRIPTORS || fails(function () { nativeGetOwnPropertyDescriptor(1); });
|
---|
| 9 |
|
---|
| 10 | // `Object.getOwnPropertyDescriptor` method
|
---|
| 11 | // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
---|
| 12 | $({ target: 'Object', stat: true, forced: FORCED, sham: !DESCRIPTORS }, {
|
---|
| 13 | getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {
|
---|
| 14 | return nativeGetOwnPropertyDescriptor(toIndexedObject(it), key);
|
---|
| 15 | }
|
---|
| 16 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.