cfe
callbag-from-event
npm i callbag-from-event
cfe

callbag-from-event

👜 Create a Callbag listenable source from events on a DOM node

by André Staltz

1.3.0 (see all)License:MITTypeScript:Built-In
npm i callbag-from-event
Readme

callbag-from-event

Create a callbag listenable source from events on a DOM node or a NodeJS Event Emitter.

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 ...

Downloads/wk

3.2K

GitHub Stars

5

LAST COMMIT

3yrs ago

MAINTAINERS

2

CONTRIBUTORS

6

OPEN ISSUES

0

OPEN PRs

2
VersionTagPublished
1.3.0
latest
3yrs ago
No alternatives found
No tutorials found
Add a tutorial

Rate & Review

100
No reviews found
Be the first to rate