callbag-pseudo-rxjs
This is a proof of concept to demonstrate how an RxJS-style API can be built using callbags under the hood. It shows that the Callbag spec does not dictate the API you find in callbag-basics. Check the source code for this repo and you'll find that we use callbags as implementation, but the external API mimics RxJS.
npm install callbag-pseudo-rxjs
example
Pick the first 5 odd numbers from a clock that ticks every second, then subscribe to it:
const Observable = ; Observable ; // 1// 3// 5// 7// 9
Log XY coordinates of click events on <button>
elements:
const Observable = ; Observable ; // {x: 110, y: 581}// {x: 295, y: 1128}// ...