asyncGeneratorDelegate.js 841 B

123456789101112131415161718192021222324
  1. var OverloadYield = require("./OverloadYield.js");
  2. function _asyncGeneratorDelegate(t) {
  3. var e = {},
  4. n = !1;
  5. function pump(e, r) {
  6. return n = !0, r = new Promise(function (n) {
  7. n(t[e](r));
  8. }), {
  9. done: !1,
  10. value: new OverloadYield(r, 1)
  11. };
  12. }
  13. return e["undefined" != typeof Symbol && Symbol.iterator || "@@iterator"] = function () {
  14. return this;
  15. }, e.next = function (t) {
  16. return n ? (n = !1, t) : pump("next", t);
  17. }, "function" == typeof t["throw"] && (e["throw"] = function (t) {
  18. if (n) throw n = !1, t;
  19. return pump("throw", t);
  20. }), "function" == typeof t["return"] && (e["return"] = function (t) {
  21. return n ? (n = !1, t) : pump("return", t);
  22. }), e;
  23. }
  24. module.exports = _asyncGeneratorDelegate, module.exports.__esModule = true, module.exports["default"] = module.exports;