This code is pretty readable thanks to async functions (here's a tutorial if you're unfamiliar with those), but it's still a little clumsy. Async iterators are available in Chrome Canary if you launch it with the flag --js-flags=--harmony-async-iteration.
Full article