# make-object-an-emitter

> Turns an object into a node emitter.

Latest version **1.0.1** (published 2015-10-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install make-object-an-emitter
pnpm add make-object-an-emitter
yarn add make-object-an-emitter
bun add make-object-an-emitter
```

## 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.1 |
| Published | 2015-10-13 |
| First published | 2015-10-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Joseph Dykstra |
| Maintainers | artskydj |
| Keywords | emitter, object, function, event |

## Links

- npm: https://www.npmjs.com/package/make-object-an-emitter
- Repository: https://github.com/ArtskydJ/make-object-an-emitter
- Homepage: https://github.com/ArtskydJ/make-object-an-emitter#readme
- Issues: https://github.com/ArtskydJ/make-object-an-emitter/issues
- npm.io page: https://npm.io/package/make-object-an-emitter

## 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.1 (latest) — 2015-10-13
- 1.0.0 — 2015-10-13

## README

make-object-an-emitter
======================

> Turns an object into a node emitter.

[![Build Status](https://travis-ci.org/ArtskydJ/make-object-an-emitter.svg)](https://travis-ci.org/ArtskydJ/make-object-an-emitter)

# Example

```js
var makeEmitter = require('make-object-an-emitter')

function myFn () {
	console.log('I am a function...')
}
makeEmitter(myFn)

myFn()
myFn.on('event', function () {
	console.log('...But I am also an event emitter!!!')
})
```

# API

```js
var makeEmitter = require('make-object-an-emitter')
```

## `makeEmitter(obj)`

`makeEmitter` mutates `obj` (an object/function), that will be turned into an event emitter. Existing properties that don't conflict with event emitter properties will be left on the object.

# License

[MIT](http://opensource.org/licenses/mit)

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