Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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;
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":
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:
}
}, {
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)) {
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;
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);
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);
}
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:
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) {
_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;