How to use the @babel/runtime/helpers/asyncToGenerator function in @babel/runtime

To help you get started, we’ve selected a few @babel/runtime examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pubkey / rxdb / dist / es / plugins / replication-graphql / index.js View on Github external
waitTillRun.then(function () {
    // trigger run once
    replicationState.run(); // start sync-interval

    if (replicationState.live) {
      if (pull) {
        _asyncToGenerator(
        /*#__PURE__*/
        _regeneratorRuntime.mark(function _callee7() {
          return _regeneratorRuntime.wrap(function _callee7$(_context7) {
            while (1) {
              switch (_context7.prev = _context7.next) {
                case 0:
                  if (replicationState.isStopped()) {
                    _context7.next = 9;
                    break;
                  }

                  _context7.next = 3;
                  return promiseWait(replicationState.liveInterval);

                case 3:
                  if (!replicationState.isStopped()) {
github pubkey / rxdb / dist / es / plugins / replication-graphql / helper.js View on Github external
function _getDocsWithRevisionsFromPouch() {
  _getDocsWithRevisionsFromPouch = _asyncToGenerator(
  /*#__PURE__*/
  _regeneratorRuntime.mark(function _callee(collection, docIds) {
    var pouch, allDocs, docsSearch, bulkGetDocs, ret;
    return _regeneratorRuntime.wrap(function _callee$(_context) {
      while (1) {
        switch (_context.prev = _context.next) {
          case 0:
            if (!(docIds.length === 0)) {
              _context.next = 2;
              break;
            }

            return _context.abrupt("return", {});

          case 2:
            // optimisation shortcut
github salesforce / lwc / packages / @lwc / compiler / src / __tests__ / fixtures / expected-babel-compat.js View on Github external
value: function () {
var _foo = _asyncToGenerator(
/*#__PURE__*/
__callKey1(_regeneratorRuntime, "mark", function _callee() {
var wat;
return __callKey3(_regeneratorRuntime, "wrap", function _callee$(_context) {
while (1) {
switch (__setKey(_context, "prev", _context._ES5ProxyType ? _context.get("next") : _context.next)) {
case 0:
__setKey(_context, "next", 2);
return bar();
case 2:
wat = _context._ES5ProxyType ? _context.get("sent") : _context.sent;
case 3:
case "end":
return __callKey0(_context, "stop");
}
}
github pubkey / broadcast-channel / dist / es / methods / node.js View on Github external
function _getReadersUuids() {
  _getReadersUuids = _asyncToGenerator(
  /*#__PURE__*/
  _regeneratorRuntime.mark(function _callee13(channelName, paths) {
    var readersPath, files;
    return _regeneratorRuntime.wrap(function _callee13$(_context13) {
      while (1) {
        switch (_context13.prev = _context13.next) {
          case 0:
            paths = paths || getPaths(channelName);
            readersPath = paths.readers;
            _context13.next = 4;
            return readdir(readersPath);

          case 4:
            files = _context13.sent;
            return _context13.abrupt("return", files.map(function (file) {
              return file.split('.');
github vuefront / vuefront / lib / store / common / vuefront / vuefront.js View on Github external
vuefrontInit: function () {
    var _vuefrontInit = _asyncToGenerator(
    /*#__PURE__*/
    _regeneratorRuntime.mark(function _callee(_ref) {
      var dispatch, commit;
      return _regeneratorRuntime.wrap(function (_context) {
        while (1) {
          switch (_context.prev = _context.next) {
            case 0:
              dispatch = _ref.dispatch, commit = _ref.commit;

              if (this.$cookies.get('token')) {
                commit('common/customer/setToken', this.$cookies.get('token'), {
                  root: true
                });
              }

              _context.next = 4;
github vuefront / vuefront / lib / store / common / country / country.js View on Github external
list: function () {
    var _list = _asyncToGenerator(
    /*#__PURE__*/
    _regeneratorRuntime.mark(function _callee(_ref, _ref2) {
      var commit, dispatch, rootGetters, page, size;
      return _regeneratorRuntime.wrap(function (_context) {
        while (1) {
          switch (_context.prev = _context.next) {
            case 0:
              commit = _ref.commit, dispatch = _ref.dispatch, rootGetters = _ref.rootGetters;
              page = _ref2.page, size = _ref2.size;
              _context.next = 4;
              return dispatch('apollo/query', {
                query: CountriesGql,
                variables: {
                  page: page,
                  size: size
                }
github pubkey / broadcast-channel / dist / es / methods / node.js View on Github external
function _ensureBaseFolderExists() {
  _ensureBaseFolderExists = _asyncToGenerator(
  /*#__PURE__*/
  _regeneratorRuntime.mark(function _callee4() {
    return _regeneratorRuntime.wrap(function _callee4$(_context4) {
      while (1) {
        switch (_context4.prev = _context4.next) {
          case 0:
            if (!ENSURE_BASE_FOLDER_EXISTS_PROMISE) {
              ENSURE_BASE_FOLDER_EXISTS_PROMISE = mkdir(TMP_FOLDER_BASE)["catch"](function () {
                return null;
              });
            }

            return _context4.abrupt("return", ENSURE_BASE_FOLDER_EXISTS_PROMISE);

          case 2:
          case "end":
github pubkey / rxdb / dist / es / plugins / replication-graphql / index.js View on Github external
return _context2.abrupt("return");

            case 2:
              if (!(this._runQueueCount > 2)) {
                _context2.next = 4;
                break;
              }

              return _context2.abrupt("return", this._runningPromise);

            case 4:
              this._runQueueCount++;
              this._runningPromise = this._runningPromise.then(
              /*#__PURE__*/
              _asyncToGenerator(
              /*#__PURE__*/
              _regeneratorRuntime.mark(function _callee() {
                var willRetry;
                return _regeneratorRuntime.wrap(function _callee$(_context) {
                  while (1) {
                    switch (_context.prev = _context.next) {
                      case 0:
                        _this2._subjects.active.next(true);

                        _context.next = 3;
                        return _this2._run();

                      case 3:
                        willRetry = _context.sent;

                        _this2._subjects.active.next(false);
github vuefront / vuefront / lib / store / common / customer / customer.js View on Github external
register: function () {
    var _register = _asyncToGenerator(
    /*#__PURE__*/
    _regeneratorRuntime.mark(function _callee5(_ref6, customerData) {
      var commit, dispatch, rootGetters;
      return _regeneratorRuntime.wrap(function (_context5) {
        while (1) {
          switch (_context5.prev = _context5.next) {
            case 0:
              commit = _ref6.commit, dispatch = _ref6.dispatch, rootGetters = _ref6.rootGetters;
              _context5.next = 3;
              return dispatch('apollo/mutate', {
                mutation: RegisterGql,
                variables: {
                  customer: customerData
                }
              }, {
                root: true
github vuefront / vuefront / lib / store / common / address / address.js View on Github external
remove: function () {
    var _remove = _asyncToGenerator(
    /*#__PURE__*/
    _regeneratorRuntime.mark(function _callee3(_ref5, _ref6) {
      var commit, dispatch, rootGetters, id;
      return _regeneratorRuntime.wrap(function (_context3) {
        while (1) {
          switch (_context3.prev = _context3.next) {
            case 0:
              commit = _ref5.commit, dispatch = _ref5.dispatch, rootGetters = _ref5.rootGetters;
              id = _ref6.id;
              _context3.next = 4;
              return dispatch('apollo/mutate', {
                mutation: AddressRemoveGql,
                variables: {
                  id: id
                }
              }, {