# @arturdoruch/event-registry

> DOM element events registry

Latest version **1.0.3** (published 2021-11-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install @arturdoruch/event-registry
pnpm add @arturdoruch/event-registry
yarn add @arturdoruch/event-registry
bun add @arturdoruch/event-registry
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2021-11-12 |
| First published | 2020-07-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Artur Doruch |
| Maintainers | arturdoruch1 |
| Keywords | event registry, html element event listener, event handler |

## Links

- npm: https://www.npmjs.com/package/@arturdoruch/event-registry
- Repository: https://github.com/arturdoruch/js-event-registry
- Homepage: https://github.com/arturdoruch/js-event-registry#readme
- Issues: https://github.com/arturdoruch/js-event-registry/issues
- npm.io page: https://npm.io/package/@arturdoruch/event-registry

## Dependencies (1)

- [jquery](https://npm.io/package/jquery.md) >=2.0

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 1.0.3 (latest) — 2021-11-12
- 1.0.2 — 2020-12-20
- 1.0.1 — 2020-07-10
- 1.0.0 — 2020-07-08

## README

# Event registry

DOM element events registry.

## Install

```sh
yarn add @arturdoruch/event-registry
```

## Usage

```js
import eventRegistry from '@arturdoruch/event-registry';

function consoleListener(e, firstArgument, secondArgument) {
    console.log(firstArgument);
    console.log(secondArgument);
}

// Register event listener to the DOM element.
const eventId = eventRegistry.on('click', 'h1', consoleListener, ['firstArgument', 'secondArgument']);

// Trigger event manually.
eventRegistry.trigger(eventId);

// Remove event listener.
//eventRegistry.off(eventId);

// Register event listener to the DOM element, which will be called only once.
//eventRegistry.one();
```

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