How to use the @babel/runtime/regenerator.mark 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 vuefront / vuefront / lib / store / store / currency / currency.js View on Github external
load: function () {
    var _load = _asyncToGenerator(
    /*#__PURE__*/
    _regeneratorRuntime.mark(function _callee(_ref) {
      var commit, dispatch, rootGetters;
      return _regeneratorRuntime.wrap(function (_context) {
        while (1) {
          switch (_context.prev = _context.next) {
            case 0:
              commit = _ref.commit, dispatch = _ref.dispatch, rootGetters = _ref.rootGetters;
              _context.next = 3;
              return dispatch('apollo/query', {
                query: currencyGetGql
              }, {
                root: true
              });

            case 3:
              if (!rootGetters['vuefront/error']) {
                commit('setCurrency', rootGetters['apollo/get'].currency);
github pubkey / broadcast-channel / dist / es / methods / node.js View on Github external
function _createSocketEventEmitter() {
  _createSocketEventEmitter = _asyncToGenerator(
  /*#__PURE__*/
  _regeneratorRuntime.mark(function _callee11(channelName, readerUuid, paths) {
    var pathToSocket, emitter, server;
    return _regeneratorRuntime.wrap(function _callee11$(_context11) {
      while (1) {
        switch (_context11.prev = _context11.next) {
          case 0:
            pathToSocket = socketPath(channelName, readerUuid, paths);
            emitter = new events.EventEmitter();
            server = net.createServer(function (stream) {
              stream.on('end', function () {});
              stream.on('data', function (msg) {
                emitter.emit('data', msg.toString());
              });
            });
            _context11.next = 5;
            return new Promise(function (resolve, reject) {
              server.on('error',
github vuefront / vuefront / lib / store / common / customer / customer.js View on Github external
logout: function () {
    var _logout = _asyncToGenerator(
    /*#__PURE__*/
    _regeneratorRuntime.mark(function _callee2(_ref2) {
      var commit, dispatch, rootGetters;
      return _regeneratorRuntime.wrap(function (_context2) {
        while (1) {
          switch (_context2.prev = _context2.next) {
            case 0:
              commit = _ref2.commit, dispatch = _ref2.dispatch, rootGetters = _ref2.rootGetters;
              _context2.next = 3;
              return dispatch('apollo/mutate', {
                mutation: LogoutGql
              }, {
                root: true
              });

            case 3:
              if (!rootGetters['vuefront/error']) {
                commit('setCustomer', {});
github pubkey / rxdb / dist / es / plugins / replication-graphql / crawling-checkpoint.js View on Github external
function _setLastPushSequence() {
  _setLastPushSequence = _asyncToGenerator(
  /*#__PURE__*/
  _regeneratorRuntime.mark(function _callee2(collection, endpointHash, seq) {
    var _id, doc, res;

    return _regeneratorRuntime.wrap(function _callee2$(_context2) {
      while (1) {
        switch (_context2.prev = _context2.next) {
          case 0:
            _id = pushSequenceId(endpointHash);
            _context2.next = 3;
            return getDocFromPouchOrNull(collection, _id);

          case 3:
            doc = _context2.sent;

            if (!doc) {
              doc = {
                _id: _id,
github pubkey / rxdb / dist / es / plugins / replication-graphql / index.js View on Github external
function () {
    var _run2 = _asyncToGenerator(
    /*#__PURE__*/
    _regeneratorRuntime.mark(function _callee2() {
      var _this2 = this;

      return _regeneratorRuntime.wrap(function _callee2$(_context2) {
        while (1) {
          switch (_context2.prev = _context2.next) {
            case 0:
              if (!this.isStopped()) {
                _context2.next = 2;
                break;
              }

              return _context2.abrupt("return");

            case 2:
              if (!(this._runQueueCount > 2)) {
                _context2.next = 4;
github vuefront / vuefront / lib / store / common / zone / zone.js View on Github external
get: function () {
    var _get = _asyncToGenerator(
    /*#__PURE__*/
    _regeneratorRuntime.mark(function _callee2(_ref2, _ref3) {
      var commit, dispatch, rootGetters, id;
      return _regeneratorRuntime.wrap(function (_context2) {
        while (1) {
          switch (_context2.prev = _context2.next) {
            case 0:
              commit = _ref2.commit, dispatch = _ref2.dispatch, rootGetters = _ref2.rootGetters;
              id = _ref3.id;
              _context2.next = 4;
              return dispatch('apollo/query', {
                query: ZoneGql,
                variables: {
                  id: id
                }
              }, {
                root: true
              });
github pubkey / broadcast-channel / dist / es / methods / node.js View on Github external
function _countChannelFolders() {
  _countChannelFolders = _asyncToGenerator(
  /*#__PURE__*/
  _regeneratorRuntime.mark(function _callee7() {
    var folders;
    return _regeneratorRuntime.wrap(function _callee7$(_context7) {
      while (1) {
        switch (_context7.prev = _context7.next) {
          case 0:
            _context7.next = 2;
            return ensureBaseFolderExists();

          case 2:
            _context7.next = 4;
            return readdir(TMP_FOLDER_BASE);

          case 4:
            folders = _context7.sent;
            return _context7.abrupt("return", folders.length);
github vuefront / vuefront / lib / store / common / customer / customer.js View on Github external
edit: function () {
    var _edit = _asyncToGenerator(
    /*#__PURE__*/
    _regeneratorRuntime.mark(function _callee3(_ref3, customerData) {
      var commit, dispatch, rootGetters;
      return _regeneratorRuntime.wrap(function (_context3) {
        while (1) {
          switch (_context3.prev = _context3.next) {
            case 0:
              commit = _ref3.commit, dispatch = _ref3.dispatch, rootGetters = _ref3.rootGetters;
              _context3.next = 3;
              return dispatch('apollo/mutate', {
                mutation: EditGql,
                variables: {
                  customer: customerData
                }
              }, {
                root: true
              });
github pubkey / broadcast-channel / dist / es / methods / node.js View on Github external
function () {
                var _ref6 = _asyncToGenerator(
                /*#__PURE__*/
                _regeneratorRuntime.mark(function _callee9(err) {
                  var useErr;
                  return _regeneratorRuntime.wrap(function _callee9$(_context9) {
                    while (1) {
                      switch (_context9.prev = _context9.next) {
                        case 0:
                          _context9.next = 2;
                          return connectionError(err);

                        case 2:
                          useErr = _context9.sent;
                          reject(useErr);

                        case 4:
                        case "end":
                          return _context9.stop();
                      }
github vuefront / vuefront / lib / store / store / compare / compare.js View on Github external
add: function () {
    var _add = _asyncToGenerator(
    /*#__PURE__*/
    _regeneratorRuntime.mark(function _callee2(_ref2, _ref3) {
      var commit, dispatch, rootGetters, product;
      return _regeneratorRuntime.wrap(function (_context2) {
        while (1) {
          switch (_context2.prev = _context2.next) {
            case 0:
              commit = _ref2.commit, dispatch = _ref2.dispatch, rootGetters = _ref2.rootGetters;
              product = _ref3.product;
              _context2.next = 4;
              return dispatch('apollo/mutate', {
                mutation: addToCompareGraphql,
                variables: {
                  id: Number(product.id)
                }
              }, {
                root: true
              });