Re:Ask HN: What is the coolest JS library out there?
by Sephr on Sunday February 17, 2013 @12:16AM
(#5234283)
Another library that tries to make async code much cleaner is async.js (https://github.com/eligrey/async.js#readme). It uses yield and generators to abstract away the callback jungle.
For example, you can easily condense tens of lines of event code into a single `event = yield document.next("click")`
Re:Ask HN: What is the coolest JS library out there?
by chadscira on Sunday February 17, 2013 @12:24AM
(#5234300)
when.js is also pretty cool. I wrote a wrapper object for node that's been extremely useful https://github.com/icodeforlove/node-promise-object
Even though it's not "cool" in the sense that it's very low level and doesn't do fancy UI stuff, my asynchronous code has become significantly cleaner and easier to maintain through using promises rather than having callback pyramids. The ability to wait for a number of promises to resolve before firing the next makes life so much easier too.