Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
10 lines
219 B
JavaScript
Executable file
10 lines
219 B
JavaScript
Executable file
/* global Promise */
|
|
'use strict';
|
|
|
|
function TaskRunner() {
|
|
this._currentTask = Promise.resolve();
|
|
}
|
|
|
|
TaskRunner.prototype.push = function(task) {
|
|
return (this._currentTask = this._currentTask.then(task, task));
|
|
};
|