https://github.com/evelynhathaway/async-iterator-channel
⚠️📢 An observable-like experiment I made to learn async iterators
https://github.com/evelynhathaway/async-iterator-channel
asynciterable asynciterator do-not-use es2018 experiment
Last synced: about 1 month ago
JSON representation
⚠️📢 An observable-like experiment I made to learn async iterators
- Host: GitHub
- URL: https://github.com/evelynhathaway/async-iterator-channel
- Owner: evelynhathaway
- License: mit
- Created: 2018-12-03T03:21:04.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2021-05-19T01:21:05.000Z (about 5 years ago)
- Last Synced: 2025-10-11T18:23:13.071Z (8 months ago)
- Topics: asynciterable, asynciterator, do-not-use, es2018, experiment
- Language: JavaScript
- Homepage:
- Size: 2.93 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Async Iterator Channel

[](/LICENSE)
An experiment I made to learn async iterators added in Node.js `v10.0.0`. It allows an implementer to create a channel consumers can subscribe to (like observables or events) and use `for await` syntax instead of callbacks.
Given that there are existing mature APIs and libraries that fit this use case, don't use this in your codebase. Instead, take a look at:
- [ES observables](https://github.com/tc39/proposal-observable)
- [RxJS observables](https://rxjs-dev.firebaseapp.com)
- [Node.js streams](https://nodejs.org/api/stream.html) which got [stable async interators](https://nodejs.org/api/stream.html#stream_readable_symbol_asynciterator) in Node.js `v11.14.0`
- [Node.js EventEmmiters](https://nodejs.org/api/events.html)
- Or just use callbacks 😜