# consuela

> No no.. I clean.

Latest version **4.2.0** (published 2014-07-22) · ISC license · 0 weekly downloads

## Install

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

## 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 | 4.2.0 |
| Published | 2014-07-22 |
| First published | 2014-06-10 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | korynunn |

## Links

- npm: https://www.npmjs.com/package/consuela
- Repository: https://github.com/KoryNunn/consuela
- Issues: https://github.com/KoryNunn/consuela/issues
- npm.io page: https://npm.io/package/consuela

## Dependencies (1)

- [grape](https://npm.io/package/grape.md) ^1.0.0

## Recent versions

- 4.2.0 (latest) — 2014-07-22
- 4.1.0 — 2014-07-22
- 4.0.0 — 2014-07-21
- 3.0.0 — 2014-07-21
- 2.0.0 — 2014-07-21
- 1.0.1 — 2014-06-25
- 1.0.0 — 2014-06-10

## README

# Consuela

No no.. I clean.

Consuela tracks bound events, and can be told to clean up when it is time to dispose of an object.

## Usage

Create an instance:

    var cleaner = new Consuela();

Watch an emitter:

    cleaner.watch(someEmitter);

Any events bound to the emitter after watch will be tracked by Conseula.

At a later point, when you want to despose of all events bound to all watched emitters:

    cleaner.cleanup();

Now, all previoudly bound events will no longer be bound.

Warning: all events bound to the emitter after this call will be cleaned up even if they were added by a third party!

You can be more specific, if your emitter is used elsewhere:

    cleaner.on(emitter, ['click', function(){...}]);

By default consuela knows to look for .on, .addEvent, .addEventListener and their respective 'off' methods
But you can tell it a different set of on and off method names if you need to:

    cleaner.watch(someWeirdEmitter, 'totesAddEvent', , 'totesUnAddEvent');

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