Bacon.js Playground
A small functional reactive programming lib for JavaScript. Turns your event spaghetti into clean and declarative feng shui bacon, by switching from imperative to functional.
1
2
3
4
5
6
7
8
const { baconObserver } = require('api/v0.3');
const Bacon = require('baconjs');
Bacon
.interval(5, '+')
.take(5)
.subscribe(baconObserver());
⚙️ API notes
To visualize the observables we developed a small API. Provided api/v0.3
package has a function baconObserver(title: string): f(Event)
, that you can call to create a subscribe function, which will display its state on the time chart in the right part of the screen.
🔗 External links
- baconjs.github.io — Official Bacon.Js page