Sha256: 1bdc8041bfb2708b679433aa3c289e92c518e144c73ac2e446e1f1d011064d57

Contents?: true

Size: 1.09 KB

Versions: 30

Compression:

Stored size: 1.09 KB

Contents

function _asyncGeneratorDelegate(inner, awaitWrap) {
  var iter = {},
      waiting = false;

  function pump(key, value) {
    waiting = true;
    value = new Promise(function (resolve) {
      resolve(inner[key](value));
    });
    return {
      done: false,
      value: awaitWrap(value)
    };
  }

  ;

  iter[typeof Symbol !== "undefined" && Symbol.iterator || "@@iterator"] = function () {
    return this;
  };

  iter.next = function (value) {
    if (waiting) {
      waiting = false;
      return value;
    }

    return pump("next", value);
  };

  if (typeof inner["throw"] === "function") {
    iter["throw"] = function (value) {
      if (waiting) {
        waiting = false;
        throw value;
      }

      return pump("throw", value);
    };
  }

  if (typeof inner["return"] === "function") {
    iter["return"] = function (value) {
      if (waiting) {
        waiting = false;
        return value;
      }

      return pump("return", value);
    };
  }

  return iter;
}

module.exports = _asyncGeneratorDelegate;
module.exports["default"] = module.exports, module.exports.__esModule = true;

Version data entries

30 entries across 30 versions & 3 rubygems

Version Path
isomorfeus-redux-4.2.0 node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js
isomorfeus-redux-4.1.18 node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js
isomorfeus-redux-4.1.17 node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js
isomorfeus-redux-4.1.16 node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js
isomorfeus-redux-4.1.15 node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js
isomorfeus-redux-4.1.14 node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js
isomorfeus-redux-4.1.13 node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js
isomorfeus-redux-4.1.12 node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js
disco_app-0.16.1 test/dummy/node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js
isomorfeus-redux-4.1.11 node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js
isomorfeus-redux-4.1.10 node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js
isomorfeus-redux-4.1.9 node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js
disco_app-0.15.2 test/dummy/node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js
isomorfeus-redux-4.1.8 node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js
isomorfeus-redux-4.1.7 node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js
disco_app-0.18.4 test/dummy/node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js
disco_app-0.18.1 test/dummy/node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js
disco_app-0.12.7.pre.puma.pre.3 test/dummy/node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js
disco_app-0.14.0 test/dummy/node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js
disco_app-0.13.6.pre.puma.pre.3 test/dummy/node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js