# pandora-events

> 实现了事件订阅与发布

Latest version **1.2.0** (published 2016-12-22) · 0 weekly downloads

## Install

```sh
npm install pandora-events
pnpm add pandora-events
yarn add pandora-events
bun add pandora-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.2.0 |
| Published | 2016-12-22 |
| First published | 2016-12-05 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+4 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | pandorajs |
| Maintainers | lynzz |
| Keywords | pandora, events |

## Links

- npm: https://www.npmjs.com/package/pandora-events
- Repository: https://github.com/pandorajs/events
- Issues: https://github.com/pandorajs/article/events
- npm.io page: https://npm.io/package/pandora-events

## Dependencies (1)

- [jquery](https://npm.io/package/jquery.md) ^1.11.1

## 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.2.0 (latest) — 2016-12-22
- 1.1.0 — 2016-12-05
- 1.1.1 — 2016-12-05

## README

# pandora-events

---

实现了事件订阅与发布

---


## Install

```
$ spm install pandora-events --save
```

## Usage

```js
var events = require('pandora-events');

// 定义事件
events.on('test', function (e, a) {
   // e.type === 'test'
});
events.on('test test2', function (e, a) {
 // e.type === 'test' or 'test2'
});
var testFunc = function (e, a) {
 // e.type === 'test'
};
events.on({
 test: testFunc
});

// 触发事件
events.fire('test', 'blah');
events.fire('test2', 'blah');
events.fire('test test2', 'blah');

// 解除事件
events.off('test');
events.off('test test2');
events.off('test', testFunc);

```

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