Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

ES6's generators and the `yield` keyword plays very nicely with callback-based code, doesn't require any changes to the underlying libraries and gives you a much nicer syntax to work with.

See https://github.com/visionmedia/co



I've been looking at another library like the one you linked. Essentially the "yield" keyword can be compared to "await" in C#.

https://github.com/bjouhier/galaxy




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: