Comment on Escape from Callback HellComments−digisth13yA great library for structuring your callbacks is "async":https://github.com/caolan/asyncI've only used it with node.js, but it's supposed to work in web browsers as well.It allows you to think a little more procedurally ("waterfall" is especially handy here) while writing CPS code. Very good.−Jare13yI have used it in browser games to load assets (images, sounds, data files) before starting a new state (menus, gameplay, etc). It's a fantastic library.−rbrcurtis13yThat's my favorite library! I think people who write in node must just see threads like this and laugh.
Comments
A great library for structuring your callbacks is "async":
https://github.com/caolan/async
I've only used it with node.js, but it's supposed to work in web browsers as well.
It allows you to think a little more procedurally ("waterfall" is especially handy here) while writing CPS code. Very good.
I have used it in browser games to load assets (images, sounds, data files) before starting a new state (menus, gameplay, etc). It's a fantastic library.
That's my favorite library! I think people who write in node must just see threads like this and laugh.