# function-emitter

> A tiny prototype to set on a funciton to make it work as an event emitter.

Latest version **1.0.0** (published 2016-04-01) · ISC license · 0 weekly downloads

## Install

```sh
npm install function-emitter
pnpm add function-emitter
yarn add function-emitter
bun add function-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.0 |
| Published | 2016-04-01 |
| First published | 2016-04-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | korynunn |

## Links

- npm: https://www.npmjs.com/package/function-emitter
- Repository: https://github.com/KoryNunn/function-emitter
- Homepage: https://github.com/KoryNunn/function-emitter#readme
- Issues: https://github.com/KoryNunn/function-emitter/issues
- npm.io page: https://npm.io/package/function-emitter

## Recent versions

- 1.0.0 (latest) — 2016-04-01

## README

# function-emitter

A tiny prototype to set on a funciton to make it work as an event emitter.

## Usage

```javascript
var functionEmitter = require('function-emitter');

var doThing = function(a,b){
    return a + b;
};

Object.setPrototypeOf(doThing, functionEmitter);

doThing(2, 4); // -> 6

doThing.on('foo', function(foo){

});

doThing.emit('foo', 'bar'); // Handled above.
```

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