get.js 745 B

1234567891011121314151617181920212223
  1. import _Reflect$get from "@babel/runtime-corejs3/core-js/reflect/get";
  2. import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js/object/get-own-property-descriptor";
  3. import superPropBase from "./superPropBase.js";
  4. export default function _get(target, property, receiver) {
  5. if (typeof Reflect !== "undefined" && _Reflect$get) {
  6. _get = _Reflect$get;
  7. } else {
  8. _get = function _get(target, property, receiver) {
  9. var base = superPropBase(target, property);
  10. if (!base) return;
  11. var desc = _Object$getOwnPropertyDescriptor(base, property);
  12. if (desc.get) {
  13. return desc.get.call(receiver);
  14. }
  15. return desc.value;
  16. };
  17. }
  18. return _get(target, property, receiver || target);
  19. }