main
Last change
on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
738 bytes
|
Line | |
---|
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.