πŸ‘œ Create a Callbag listenable source from events on a DOM node
Switch branches/tags
Nothing to show
Clone or download
Latest commit 2dc28c4 Nov 8, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Distribute module entry Nov 7, 2018
.travis.yml Setup travis Jun 2, 2018
LICENSE initial commit Jan 29, 2018
index.js Support options Nov 8, 2018
package-lock.json Distribute module entry Nov 7, 2018
package.json release 1.2.0 Nov 8, 2018
readme.md add missing parens, observe->foreach Feb 16, 2018
test.js Support options Nov 8, 2018
types.d.ts Support options Nov 8, 2018

readme.md

callbag-from-event

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

npm install callbag-from-event

example

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

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

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

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