# callbag-from-event

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

Latest version **1.3.0** (published 2020-02-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install callbag-from-event
pnpm add callbag-from-event
yarn add callbag-from-event
bun add callbag-from-event
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.0 |
| Published | 2020-02-24 |
| First published | 2018-01-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 9.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | staltz.com |
| Maintainers | staltz, zimme |
| Keywords | callbag |

## Links

- npm: https://www.npmjs.com/package/callbag-from-event
- Repository: https://github.com/staltz/callbag-from-event
- Homepage: https://github.com/staltz/callbag-from-event#readme
- Issues: https://github.com/staltz/callbag-from-event/issues
- npm.io page: https://npm.io/package/callbag-from-event

## Dependencies (1)

- [callbag](https://npm.io/package/callbag.md) ^1.1.0

## Recent versions

- 1.3.0 (latest) — 2020-02-24
- 1.2.1 — 2019-02-09
- 1.2.0 — 2018-11-08
- 1.1.0 — 2018-08-30
- 1.0.0 — 2018-01-30

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

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

---
_Source: https://npm.io/package/callbag-from-event · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
