Created
May 19, 2015 21:05
-
-
Save rubennorte/09fd260478f111c0e18d to your computer and use it in GitHub Desktop.
Sequential promises
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function executeSequentially(promises) { | |
| return promises.reduce(function (result, promise) { | |
| return result.then(promise); | |
| }, Promise.resolve()); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment