# event-target-subscriber

> EventTarget subscriber

Latest version **1.0.1** (published 2017-01-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install event-target-subscriber
pnpm add event-target-subscriber
yarn add event-target-subscriber
bun add event-target-subscriber
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2017-01-13 |
| First published | 2017-01-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.6 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | tditlu |
| Maintainers | tditlu |
| Keywords | event-target-subscriber, event, event-target, subscriber |

## Links

- npm: https://www.npmjs.com/package/event-target-subscriber
- Repository: https://github.com/tditlu/event-target-subscriber
- Homepage: https://github.com/tditlu/event-target-subscriber#readme
- Issues: https://github.com/tditlu/event-target-subscriber/issues
- npm.io page: https://npm.io/package/event-target-subscriber

## Alternatives

- [async-exit-hook](https://npm.io/package/async-exit-hook.md) — 3.7M weekly downloads
- [evnty](https://npm.io/package/evnty.md) — 7.2K weekly downloads
- [eleventy-plugin-asciidoc](https://npm.io/package/eleventy-plugin-asciidoc.md) — 3.5K weekly downloads
- [@jswork/next-get2get](https://npm.io/package/@jswork/next-get2get.md) — 945 weekly downloads
- [@dashersw/axon](https://npm.io/package/@dashersw/axon.md) — 934 weekly downloads

## Recent versions

- 1.0.1 (latest) — 2017-01-13
- 1.0.0 — 2017-01-12

## README

# event-target-subscriber

EventTarget subscriber

## Installation

```sh
$ npm install event-target-subscriber
```

## Usage

```js
import { subscribe, unsubscribe } from 'event-target-subscriber';

class App {
  constructor() {
    this.subscriber = subscribe(window, 'click', event => this.onClick(event));
  }

  onClick(event) {
    console.log(event);

    unsubscribe(this.subscriber);
  }
}
```

## License

[MIT](LICENSE)

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