Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/staltz/callbag-from-event
👜 Create a Callbag listenable source from events on a DOM node
https://github.com/staltz/callbag-from-event
Last synced: 5 days ago
JSON representation
👜 Create a Callbag listenable source from events on a DOM node
- Host: GitHub
- URL: https://github.com/staltz/callbag-from-event
- Owner: staltz
- License: mit
- Created: 2018-01-29T10:56:59.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-04-20T06:28:32.000Z (over 1 year ago)
- Last Synced: 2024-12-19T16:41:19.910Z (25 days ago)
- Language: JavaScript
- Homepage:
- Size: 24.4 KB
- Stars: 6
- Watchers: 3
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
- awesome-callbags - 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 `` node.
```js
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 ...
```