Created
August 9, 2015 03:43
-
-
Save Azerothian/4cdfe98fd28f67af86f9 to your computer and use it in GitHub Desktop.
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
save = () -> | |
return new Promise (resolve, reject) -> | |
# do save shit | |
return resolve() | |
promises = [] | |
for i in array | |
promises.push save(i) | |
Promise.all(promises).then () -> | |
#onto next |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment