# eenano

> A tiny pessimistic event emitter. Optimized for no listeners.

Latest version **2.1.0** (published 2015-01-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install eenano
pnpm add eenano
yarn add eenano
bun add eenano
```

## 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 | 2.1.0 |
| Published | 2015-01-17 |
| First published | 2014-08-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Bryce B. Baril |
| Maintainers | bryce |
| Keywords | event, emitter |

## Links

- npm: https://www.npmjs.com/package/eenano
- Repository: git@github.com:brycebaril/eenano
- Homepage: https://github.com/brycebaril/eenano
- Issues: https://github.com/brycebaril/eenano/issues
- npm.io page: https://npm.io/package/eenano

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

- 2.1.0 (latest) — 2015-01-17
- 2.0.0 — 2015-01-15
- 1.0.0 — 2014-08-16

## README

eenano
=====

[![NPM](https://nodei.co/npm/eenano.png)](https://nodei.co/npm/eenano/)

It's an EventEmitter! Like the one provided by core, but it does a **whole lot less!!** And it should be faster when there is nothing to do.

This EventEmitter is optimized for no listeners on any event. It should be plenty fast if there are listeners, of course...

It doesn't do most of what the core EventEmitter library does. If you need features, just use core.

A list of things this doesn't do:
  * Remove listeners
  * `once`
  * Special case the `error` event
  * domains
  * polymorphic event handlers
  * and more! (less?)

A list of what it does the core library doesn't:
  * Optimized for no listeners at all
  * Allows you to specify a `this` with `.on` to avoid `Function#bind`

```javascript

var EENano = require("eenano")

var ee = EENano()
ee.on("msg", function (foo) {
  console.log(foo)
})
ee.emit("msg", "hi")
// hi

```

API
===

`var ee = require("eenano")()`
---

Create an event emitter instance.

`.on(event, handler[, thisArg])`
---

On `event` synchronously call `handler()` if provided, call `handler` with `this` set to `thisArg`

`.emit(event, message)`
---

Call all handlers listening for `event` with `handler(metadata)`

`.events()`
---

List events that have any handlers

`.listeners(event)`
---

List handlers for a given event

LICENSE
=======

MIT

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