You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
600 B

4 years ago
  1. var superPropBase = require("./superPropBase");
  2. function _get(target, property, receiver) {
  3. if (typeof Reflect !== "undefined" && Reflect.get) {
  4. module.exports = _get = Reflect.get;
  5. } else {
  6. module.exports = _get = function _get(target, property, receiver) {
  7. var base = superPropBase(target, property);
  8. if (!base) return;
  9. var desc = Object.getOwnPropertyDescriptor(base, property);
  10. if (desc.get) {
  11. return desc.get.call(receiver);
  12. }
  13. return desc.value;
  14. };
  15. }
  16. return _get(target, property, receiver || target);
  17. }
  18. module.exports = _get;