1.0.1 • Published 7 years ago

for-await v1.0.1

Weekly downloads
1
License
MIT
Repository
-
Last release
7 years ago

Install

npm install --save for-await
const 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.

1.0.1

7 years ago

1.0.0

7 years ago