Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- async = generator => {
- const g = generator();
- (function next(value) {
- const n = g.next(value);
- if (n.done) return;
- n.value.then(next);
- }());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement