# eventdispatcher.js

> Dispatching custom events

Latest version **0.0.2** (published 2013-11-21) · 0 weekly downloads

## Install

```sh
npm install eventdispatcher.js
pnpm add eventdispatcher.js
yarn add eventdispatcher.js
bun add eventdispatcher.js
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2013-11-21 |
| First published | 2013-09-28 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | sole |
| Keywords | events, reinventing the wheel |

## Links

- npm: https://www.npmjs.com/package/eventdispatcher.js
- Repository: git@github.com:sole/eventdispatcher.js
- Homepage: https://github.com/sole/eventdispatcher.js
- Issues: https://github.com/sole/eventdispatcher.js/issues
- npm.io page: https://npm.io/package/eventdispatcher.js

## 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.2 (latest) — 2013-11-21
- 0.0.1 — 2013-09-28

## README

eventdispatcher.js
========

#### JavaScript events for custom objects ####

### Usage ###

```html
<script src="EventDispatcher.js"></script>
<script>

	// Adding events to custom object

	var Car = function () {

		this.start = function () {

			this.dispatchEvent( { type: 'start', message: 'vroom vroom!' } );

		};

	};

	Car.prototype = Object.create( EventDispatcher.prototype );


	// Using events

	var car = new Car();

	car.addEventListener( 'start', function ( event ) {

		alert( event.message );

	} );

	car.start();

</script>
```

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