# @evodev/eventemitter

> An EventEmitter made by EvoDev

Latest version **1.0.7** (published 2020-10-30) · ISC license · 0 weekly downloads

## Install

```sh
npm install @evodev/eventemitter
pnpm add @evodev/eventemitter
yarn add @evodev/eventemitter
bun add @evodev/eventemitter
```

## 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.7 |
| Published | 2020-10-30 |
| First published | 2020-10-22 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | nekomaru76 |
| Maintainers | akuankka128, hyp3r, nekomaru76 |
| Keywords | eventemitter, evodev |

## Links

- npm: https://www.npmjs.com/package/@evodev/eventemitter
- npm.io page: https://npm.io/package/@evodev/eventemitter

## Dependencies (1)

- [cuid](https://npm.io/package/cuid.md) ^2.1.8

## 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.7 (latest) — 2020-10-30
- 1.0.6 — 2020-10-30
- 1.0.5 — 2020-10-22
- 1.0.4 — 2020-10-22
- 1.0.3 — 2020-10-22
- 1.0.0 — 2020-10-22

## README

# EventEmitter
> is an object/method which triggers an event as soon as some action takes place so as to pass the cntrol to the parent function.

## Usage
- `EventEmitter#on(event, callback)`
> To add new callback function with `event` as name. It will return an ID as identity.
- `EventEmitter#emit(event)`
> To emit functions those have `event` as name.
- `EventEmitter#off(id)`
> To delete a function that have `id` as ID.
- `EventEmitter#get(name)`
> To get an event data with `name` as name.

## Example
```js
const EE = require("@evodev/eventemitter");
const ee = new EE();

let ids = [];

ids.push(ee.once("lol", () => 10*1));

console.log(ee.emit("lol")); //["lol"]
console.log(ee.emit("lol")); //false
```

## Support
- [Discord Server](https://discord.gg/4kUDR5G)

## Developer
- Gaia#7541 (Discord)

## Donation
- PayPal: nekomaru76

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