1.0.1 • Published 8 years ago
for-await v1.0.1
Install
npm install --save for-awaitconst forAwait = require('for-await');Usage
forAwait((item) => {
// iteration
}).of(asyncGenerator()).then(() => {
// done
});API
forAwait( fn:function ).of( source:asyncIterable|syncIterable ):Promise<undefined>
fn is called with item, index, source.
of returns a Promise that resolves when iteration has finished.