Projekt

Obecné

Profil

Stáhnout (1.01 KB) Statistiky
| Větev: | Revize:
1
"use strict";
2

    
3
exports.__esModule = true;
4

    
5
var _getPrototypeOf = require("../core-js/object/get-prototype-of");
6

    
7
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
8

    
9
var _getOwnPropertyDescriptor = require("../core-js/object/get-own-property-descriptor");
10

    
11
var _getOwnPropertyDescriptor2 = _interopRequireDefault(_getOwnPropertyDescriptor);
12

    
13
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14

    
15
exports.default = function get(object, property, receiver) {
16
  if (object === null) object = Function.prototype;
17
  var desc = (0, _getOwnPropertyDescriptor2.default)(object, property);
18

    
19
  if (desc === undefined) {
20
    var parent = (0, _getPrototypeOf2.default)(object);
21

    
22
    if (parent === null) {
23
      return undefined;
24
    } else {
25
      return get(parent, property, receiver);
26
    }
27
  } else if ("value" in desc) {
28
    return desc.value;
29
  } else {
30
    var getter = desc.get;
31

    
32
    if (getter === undefined) {
33
      return undefined;
34
    }
35

    
36
    return getter.call(receiver);
37
  }
38
};
(50-50/85)