2 ms·
Async generators should be a very natural interface for many event-based APIs, e.g. WebSocket.onmessage. Unfortunately converting a callback-based API to an asy
by oefrha 4y ago
Async generators should be a very natural interface for many event-based APIs, e.g. WebSocket.onmessage. Unfortunately converting a callback-based API to an async generator is highly nontrivial.
- michaelsbradley 4y agoEasily done with Ix: https://github.com/ReactiveX/IxJS/blob/master/docs/asynciterable/converting.md#creating-a-sequence-from-events https://github.com/ReactiveX/IxJS/blob/master/docs/asynciter...