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 rakannimer / react-orchestra / web / es / components / Note.js View on Github external
Note.prototype.startPlayingNote = function () {
    var _ref4 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee4() {
      var buffer;
      return _regeneratorRuntime.wrap(function _callee4$(_context4) {
        while (1) {
          switch (_context4.prev = _context4.next) {
            case 0:
              // if (this.props.interactive === false) return;
              this.setState({ isPlaying: true });
              _context4.prev = 1;

              callIfExists(this.props.onStartPlayingNote, this.props.instrumentName, this.props.name);
              _context4.next = 5;
              return playNote(this.props.instrumentName, this.props.name, { gain: this.props.gain });

            case 5:
              buffer = _context4.sent;
github lukeed / taskr / dist / fly.js View on Github external
value: function concat(name) {
      this.write(_regeneratorRuntime.mark(function callee$2$0(_ref5) {
        var path = _ref5.path;
        var source = _ref5.source;
        var target = _ref5.target;
        return _regeneratorRuntime.wrap(function callee$2$0$(context$3$0) {
          while (1) switch (context$3$0.prev = context$3$0.next) {
            case 0:
              _("concat %o", target);
              _mkdirp2["default"].sync(path); // @TODO: should clear the target file to concat!
              context$3$0.next = 4;
              return (0, _mzFs.appendFile)((0, _path.join)(path, name), source, this.encoding);

            case 4:
              _("concat ✔");

            case 5:
            case "end":
github lukeed / taskr / dist / fly.js View on Github external
return _regeneratorRuntime.wrap(function callee$3$0$(context$4$0) {
                  while (1) switch (context$4$0.prev = context$4$0.next) {
                    case 0:
                      file = _step3.value;

                      _("file %o", file);
                      _parse = (0, _path.parse)(file);
                      dir = _parse.dir;
                      name = _parse.name;
                      _ext = _parse.ext;
                      globCache = glob.split(_path.sep);
                      context$4$0.t0 = _regeneratorRuntime.mark(function reduce(data, ext, filters) {
                        var f;
                        return _regeneratorRuntime.wrap(function reduce$(context$5$0) {
                          while (1) switch (context$5$0.prev = context$5$0.next) {
                            case 0:
                              f = filters[0];

                              if (!(filters.length === 0)) {
                                context$5$0.next = 5;
                                break;
                              }

                              context$5$0.t0 = { data: data, ext: ext };
                              context$5$0.next = 16;
                              break;

                            case 5:
github gngeorgiev / firesync / dist / firesync.js View on Github external
}
    }, {
        key: '_fireSynced',

        /**
         * Fired when the local object's value is sucesfully set to the remote.
         * @param {Error} err Synchronization error
         * @event FiresyncBase#synced
         * @example firesyncObject.on('synced', function(err){});
         */
        value: function _fireSynced(err) {
            this.emit('synced', err);
        }
    }, {
        key: '_enumerate',
        value: _regeneratorRuntime.mark(function _enumerate() {
            var obj = arguments[0] === undefined ? this : arguments[0];
            var i;
            return _regeneratorRuntime.wrap(function _enumerate$(context$2$0) {
                while (1) switch (context$2$0.prev = context$2$0.next) {
                    case 0:
                        context$2$0.t0 = _regeneratorRuntime.keys(obj);

                    case 1:
                        if ((context$2$0.t1 = context$2$0.t0()).done) {
                            context$2$0.next = 8;
                            break;
                        }

                        i = context$2$0.t1.value;

                        if (!(obj.hasOwnProperty(i) && this.__$$.FILTERED_PROPERTIES.indexOf(i) === -1)) {
github rakannimer / react-orchestra / web / es / MusicManager.js View on Github external
var getSoundFromRemote = function () {
  var _ref = _asyncToGenerator(_regeneratorRuntime.mark(function _callee(instrumentName, noteName) {
    var noteURL, mp3, mp3Blob;
    return _regeneratorRuntime.wrap(function _callee$(_context) {
      while (1) {
        switch (_context.prev = _context.next) {
          case 0:
            noteURL = instrumentAndNoteNameToRemotePath(instrumentName, noteName);
            _context.next = 3;
            return fetch(noteURL);

          case 3:
            mp3 = _context.sent;
            _context.next = 6;
            return mp3.arrayBuffer();

          case 6:
            mp3Blob = _context.sent;
github ChaosGroup / redux-saga-first-router / lib / es / index.js View on Github external
import _regeneratorRuntime from 'babel-runtime/regenerator';
import _typeof from 'babel-runtime/helpers/typeof';
import _getIterator from 'babel-runtime/core-js/get-iterator';
import _Map from 'babel-runtime/core-js/map';
import _extends from 'babel-runtime/helpers/extends';

var _marked = /*#__PURE__*/_regeneratorRuntime.mark(onNavigate),
    _marked2 = /*#__PURE__*/_regeneratorRuntime.mark(routeSaga),
    _marked3 = /*#__PURE__*/_regeneratorRuntime.mark(historyToStore),
    _marked4 = /*#__PURE__*/_regeneratorRuntime.mark(storeToHistory),
    _marked5 = /*#__PURE__*/_regeneratorRuntime.mark(saga);

import { eventChannel, buffers } from 'redux-saga';
import { take, put, call, takeLatest, fork } from 'redux-saga/effects';
import pathToRegexp from 'path-to-regexp';

export var NAVIGATE = 'router/NAVIGATE';

export function navigate(id) {
	var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
	var opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};

	return _extends({ type: NAVIGATE, id: id, params: params }, opts);
github ChaosGroup / redux-saga-first-router / lib / es / index.js View on Github external
import _regeneratorRuntime from 'babel-runtime/regenerator';
import _typeof from 'babel-runtime/helpers/typeof';
import _getIterator from 'babel-runtime/core-js/get-iterator';
import _Map from 'babel-runtime/core-js/map';
import _extends from 'babel-runtime/helpers/extends';

var _marked = /*#__PURE__*/_regeneratorRuntime.mark(onNavigate),
    _marked2 = /*#__PURE__*/_regeneratorRuntime.mark(routeSaga),
    _marked3 = /*#__PURE__*/_regeneratorRuntime.mark(historyToStore),
    _marked4 = /*#__PURE__*/_regeneratorRuntime.mark(storeToHistory),
    _marked5 = /*#__PURE__*/_regeneratorRuntime.mark(saga);

import { eventChannel, buffers } from 'redux-saga';
import { take, put, call, takeLatest, fork } from 'redux-saga/effects';
import pathToRegexp from 'path-to-regexp';

export var NAVIGATE = 'router/NAVIGATE';

export function navigate(id) {
	var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
	var opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};

	return _extends({ type: NAVIGATE, id: id, params: params }, opts);
}
github ratson / factory-bot / dist / index.es6.js View on Github external
value: function () {
      var _ref3 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee3(name, attrs) {
        var _this3 = this;

        var buildOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
        var adapter;
        return _regeneratorRuntime.wrap(function _callee3$(_context3) {
          while (1) {
            switch (_context3.prev = _context3.next) {
              case 0:
                adapter = this.getAdapter(name);
                return _context3.abrupt('return', this.getFactory(name).create(adapter, attrs, buildOptions).then(function (createdModel) {
                  return _this3.addToCreatedList(adapter, createdModel);
                }).then(function (model) {
                  return _this3.options.afterCreate ? _this3.options.afterCreate(model, attrs, buildOptions) : model;
                }));

              case 2:
github ChaosGroup / redux-saga-first-router / lib / es / index.js View on Github external
import _regeneratorRuntime from 'babel-runtime/regenerator';
import _typeof from 'babel-runtime/helpers/typeof';
import _getIterator from 'babel-runtime/core-js/get-iterator';
import _Map from 'babel-runtime/core-js/map';
import _extends from 'babel-runtime/helpers/extends';

var _marked = /*#__PURE__*/_regeneratorRuntime.mark(onNavigate),
    _marked2 = /*#__PURE__*/_regeneratorRuntime.mark(routeSaga),
    _marked3 = /*#__PURE__*/_regeneratorRuntime.mark(historyToStore),
    _marked4 = /*#__PURE__*/_regeneratorRuntime.mark(storeToHistory),
    _marked5 = /*#__PURE__*/_regeneratorRuntime.mark(saga);

import { eventChannel, buffers } from 'redux-saga';
import { take, put, call, takeLatest, fork } from 'redux-saga/effects';
import pathToRegexp from 'path-to-regexp';

export var NAVIGATE = 'router/NAVIGATE';

export function navigate(id) {
	var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
	var opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};

	return _extends({ type: NAVIGATE, id: id, params: params }, opts);
}

export function route(id, path, saga) {
github wavesjs / waves-ui / dist / core / view.js View on Github external
_iteratorError = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion && _iterator["return"]) {
            _iterator["return"]();
          }
        } finally {
          if (_didIteratorError) {
            throw _iteratorError;
          }
        }
      }
    }
  }, {
    key: _core.Symbol.iterator,
    value: _regeneratorRuntime.mark(function callee$1$0() {
      var _this = this;

      return _regeneratorRuntime.wrap(function callee$1$0$(context$2$0) {
        while (1) switch (context$2$0.prev = context$2$0.next) {
          case 0:
            return context$2$0.delegateYield(_core.$for.getIterator(_this.layers), "t38", 1);

          case 1:
          case "end":
            return context$2$0.stop();
        }
      }, callee$1$0, this);
    })
  }]);

  return View;