1 | 'use strict';
|
2 | var DESCRIPTORS = require('../internals/descriptors');
|
3 | var call = require('../internals/function-call');
|
4 | var propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');
|
5 | var createPropertyDescriptor = require('../internals/create-property-descriptor');
|
6 | var toIndexedObject = require('../internals/to-indexed-object');
|
7 | var toPropertyKey = require('../internals/to-property-key');
|
8 | var hasOwn = require('../internals/has-own-property');
|
9 | var IE8_DOM_DEFINE = require('../internals/ie8-dom-define');
|
10 |
|
11 |
|
12 | var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
13 |
|
14 |
|
15 |
|
16 | exports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
|
17 | O = toIndexedObject(O);
|
18 | P = toPropertyKey(P);
|
19 | if (IE8_DOM_DEFINE) try {
|
20 | return $getOwnPropertyDescriptor(O, P);
|
21 | } catch (error) { }
|
22 | if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);
|
23 | };
|