Same idea, but you may find it slightly classier or more compact:
funcs.reduce((prev, cur) => prev.then(cur), starting_promise);
If you have no specific starting_promise
you want to use, just use Promise.resolve()
.
Same idea, but you may find it slightly classier or more compact:
funcs.reduce((prev, cur) => prev.then(cur), starting_promise);
If you have no specific starting_promise
you want to use, just use Promise.resolve()
.