Skip to content

Instantly share code, notes, and snippets.

@pionize pionize/.js Secret
Created Apr 27, 2017

What would you like to do?
function executeSequentially(promiseFactories) {
var result = Promise.resolve();
promiseFactories.forEach(function (promiseFactory) {
result = result.then(promiseFactory);
return result;
function myPromiseFactory() {
return somethingThatCreatesAPromise();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.