JSPM

@nathanpb/rxjs-async-iterator

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q13840F
  • License Apache-2.0

Converts async iterators from RxJS observables to consume in for-await-of loops

Package Exports

  • @nathanpb/rxjs-async-iterator
  • @nathanpb/rxjs-async-iterator/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@nathanpb/rxjs-async-iterator) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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);
}