# a-events

> Event handler library

Latest version **1.0.1** (published 2015-04-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install a-events
pnpm add a-events
yarn add a-events
bun add a-events
```

## 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-04-03 |
| First published | 2014-12-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Lajos Koszti |
| Maintainers | ajnasz |

## Links

- npm: https://www.npmjs.com/package/a-events
- npm.io page: https://npm.io/package/a-events

## Recent versions

- 1.0.1 (latest) — 2015-04-03
- 1.0.0 — 2014-12-04

## README

# a-events

Event handler javascript library

# Usage

## Object.create

```javascript
require(['events'], function (events) {
	var object = Object.create(events(), {
			emitter: {
				value: function () {
					this.emit('aEvent', arg1, arg2, arg3);
				}
			}
	});

	object.on('aEvent', function (argPredefined, arg1, arg2, arg3) {
		console.log(argPredefined, arg1, arg2, arg3);
	}, argPredefined);

	object.emitter();
});
```

## Old prototype

```javascript
require(['events'], function (events) {
	function Foo() {}
	Foo.prototype = events();
	Foo.prototype.emitter = function () {
		this.emit('aEvent', arg1, arg2, arg3);
	};
	var object = new Foo();
	object.on('aEvent', function (argPredefined, arg1, arg2, arg3) {
		console.log(argPredefined, arg1, arg2, arg3);
	}, argPredefined);

	object.emitter();
});
```

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