1.0.0 • Published 5 years ago

tallbag-from-event v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

tallbag-from-event

Create a tallbag listenable source from events on a DOM node.

npm install tallbag-from-event

example

Create a listenable source of click events on the <body> node.

const fromEvent = require('tallbag-from-event');
const forEach = require('callbag-for-each');

const source = fromEvent(document.body, 'click');

forEach(x => console.log(x))(source); // MouseEvent ...
                                      // MouseEvent ...