Proof that we don't need async/await to get async generators
JavaScript
Latest commit fd8c370 Oct 3, 2015 @spion initial commit
Permalink
Failed to load latest commit information.
.gitignore initial commit Oct 3, 2015
README.md initial commit Oct 3, 2015
engine.js initial commit Oct 3, 2015
package.json initial commit Oct 3, 2015
test.js initial commit Oct 3, 2015

README.md

Async Generators

Proof that async generators dont need async/await

example

var async   = require('./engine')
var Promise = require('bluebird');

var tenNumbers = async(function* tenNumbers() {
    for (var k = 0; k < 10; ++k) {
        yield async.await(Promise.delay(100));
        console.log(k);
        yield async.yield(k);
    }
})

async.iterate(tenNumbers(), val => console.log("Iterating", val));

license

public domain / MIT