Sha256: c2a9469cab30fa3b187d027d3c32ec5e3d04893a333971f552834dcdab92b55d

Contents?: true

Size: 929 Bytes

Versions: 28

Compression:

Stored size: 929 Bytes

Contents

"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = _asyncToGenerator;
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
  try {
    var info = gen[key](arg);
    var value = info.value;
  } catch (error) {
    reject(error);
    return;
  }
  if (info.done) {
    resolve(value);
  } else {
    Promise.resolve(value).then(_next, _throw);
  }
}
function _asyncToGenerator(fn) {
  return function () {
    var self = this,
      args = arguments;
    return new Promise(function (resolve, reject) {
      var gen = fn.apply(self, args);
      function _next(value) {
        asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
      }
      function _throw(err) {
        asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
      }
      _next(undefined);
    });
  };
}

//# sourceMappingURL=asyncToGenerator.js.map

Version data entries

28 entries across 24 versions & 2 rubygems

Version Path
immosquare-cleaner-0.1.62 node_modules/@babel/helpers/lib/helpers/asyncToGenerator.js
immosquare-cleaner-0.1.61 node_modules/@babel/helpers/lib/helpers/asyncToGenerator.js
immosquare-cleaner-0.1.60 node_modules/@babel/helpers/lib/helpers/asyncToGenerator.js
immosquare-cleaner-0.1.59 node_modules/@babel/helpers/lib/helpers/asyncToGenerator.js
immosquare-cleaner-0.1.58 node_modules/@babel/helpers/lib/helpers/asyncToGenerator.js
immosquare-cleaner-0.1.57 node_modules/@babel/helpers/lib/helpers/asyncToGenerator.js
immosquare-cleaner-0.1.56 node_modules/@babel/helpers/lib/helpers/asyncToGenerator.js
immosquare-cleaner-0.1.55 node_modules/@babel/helpers/lib/helpers/asyncToGenerator.js
immosquare-cleaner-0.1.54 node_modules/@babel/helpers/lib/helpers/asyncToGenerator.js
immosquare-cleaner-0.1.53 node_modules/@babel/helpers/lib/helpers/asyncToGenerator.js
immosquare-cleaner-0.1.52 node_modules/@babel/helpers/lib/helpers/asyncToGenerator.js
immosquare-cleaner-0.1.51 node_modules/@babel/helpers/lib/helpers/asyncToGenerator.js
immosquare-cleaner-0.1.51 node_modules/jscodeshift/node_modules/@babel/core/node_modules/@babel/helpers/lib/helpers/asyncToGenerator.js
immosquare-cleaner-0.1.50 node_modules/jscodeshift/node_modules/@babel/core/node_modules/@babel/helpers/lib/helpers/asyncToGenerator.js
immosquare-cleaner-0.1.50 node_modules/@babel/helpers/lib/helpers/asyncToGenerator.js
immosquare-cleaner-0.1.49 node_modules/@babel/helpers/lib/helpers/asyncToGenerator.js
immosquare-cleaner-0.1.49 node_modules/jscodeshift/node_modules/@babel/core/node_modules/@babel/helpers/lib/helpers/asyncToGenerator.js
immosquare-cleaner-0.1.48 node_modules/jscodeshift/node_modules/@babel/core/node_modules/@babel/helpers/lib/helpers/asyncToGenerator.js
immosquare-cleaner-0.1.48 node_modules/@babel/helpers/lib/helpers/asyncToGenerator.js
immosquare-cleaner-0.1.47 node_modules/@babel/helpers/lib/helpers/asyncToGenerator.js