1.0.1 • Published 3 years ago

@ricsam/rxjs-async-iterator v1.0.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 years ago

Async iterators for RxJS

Adds async iterators (aka for-await-of loops)

Installation

The package is served via npm:

npm i --save rxjs-async-iterator

Usage

import {from} from 'rxjs';
import {delay} from 'rxjs/operators';
import {toAsyncIterable} from 'rxjs-async-iterator';

const numbers$ = from([1, 2, 3]).pipe(delay(100));

for async (const value of toAsyncIterable(numbers$)) {
    console.log(value);
}