2.1.0 • Published 4 years ago

asynciterator-promiseproxy v2.1.0

Weekly downloads
38
License
MIT
Repository
github
Last release
4 years ago

Async Promise Proxy Iterator

Build Status Coverage Status npm version Greenkeeper badge

An AsyncIterator proxy that allows its source to be set via a promise.

This is useful in cases when you need to pass an iterator, but only know its source at a later stage, or if you want to create this source lazilly.

Usage

const PromiseProxyIterator = require('asynciterator-promiseproxy').PromiseProxyIterator;

let it = new PromiseProxyIterator(() -> makeIterator());
it.on('data', console.log);

async function makeIterator() {
  someExpensiveOperation();
  return AsyncIterator.range(0, 10); 
}

License

This software is written by Ruben Taelman.

This code is released under the MIT license.

2.1.0

4 years ago

2.0.0

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago