Launch Week Day 2: Introducing Reports: An Extensible Reporting Framework for Socket Data.Learn More
Socket
Book a DemoSign in
Socket

callbag-from-event

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

callbag-from-event

Create a callbag listenable source from events on a DOM node

latest
Source
npmnpm
Version
1.3.0
Version published
Maintainers
2
Created
Source

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

Keywords

callbag

FAQs

Package last updated on 24 Feb 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts