callbag-from-event
TypeScript icon, indicating that this package has built-in type declarations

1.3.0 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.3.0
    17,021
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.3.0
    17,021
  • 1.2.1
    84
  • 1.2.0
    38
  • 1.1.0
    7
  • 1.0.0
    435

Package Sidebar

Install

npm i callbag-from-event

Weekly Downloads

5,844

Version

1.3.0

License

MIT

Unpacked Size

9.48 kB

Total Files

8

Last publish

Collaborators

  • staltz
  • zimme