1.0.0 • Published 7 years ago
tallbag-from-event v1.0.0
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 ...1.0.0
7 years ago