# asemitter

> A tiny event emitter library

Latest version **0.0.0** (published 2015-07-20) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.0 |
| Published | 2015-07-20 |
| First published | 2015-07-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Erin Dachtler |
| Maintainers | download |
| Keywords | event, emitter |

## Links

- npm: https://www.npmjs.com/package/asemitter
- Repository: https://github.com/download13/asemitter
- Homepage: https://github.com/download13/asemitter#readme
- Issues: https://github.com/download13/asemitter/issues
- npm.io page: https://npm.io/package/asemitter

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

- 0.0.0 (latest) — 2015-07-20

## README

# asEmitter

## Install

`npm install asemitter`

## Examples

```javascript
var asEmitter = require('asemitter');


// Make a class instance an event emitter
function SomeObject() {
	asEmitter(this); // this is now an event emitter

	this.on('someevent', function() {
		// Do some stuff
	});
}

var instance = new SomeObject();


// Make any object into an event emitter
var emitter = asEmitter({
	getState: function() {
		return 'whatever';
	}
});


// It event works without an object
var anotherEmitter = asEmitter();

anotherEmitter.emit('testevent');
```

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