# light-event

> lightweight pubSub pattern event for javascript.

Latest version **0.0.5** (published 2015-11-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install light-event
pnpm add light-event
yarn add light-event
bun add light-event
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2015-11-29 |
| First published | 2015-11-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | liang guo |
| Maintainers | xr |
| Keywords | pubsub, Eventer, emitter |

## Links

- npm: https://www.npmjs.com/package/light-event
- Repository: https://github.com/xr/Eventer
- Issues: https://github.com/xr/Eventer/issues
- npm.io page: https://npm.io/package/light-event

## 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.5 (latest) — 2015-11-29
- 0.0.4 — 2015-11-29
- 0.0.3 — 2015-11-29
- 0.0.1 — 2015-11-29

## README

# light-event

  lightweight pubSub pattern event for javascript.

## Installation
```bash
  $ npm install light-event
```
### on(event, fn)
```js
var LE = require('light-event');

var e = new LE;

e.on('sayHi', function (data) {
    console.log('hi, ' + data);
})

e.trigger('sayHi', 'light-event'); // hi, light-event
```

### once(event, cb)

  Register a one-time event which will be removed immediately after been invoked.

### trigger(event)
   Trigger Events!

### off(event, [fn1, fn2..])

  Cancel events or some specific callbacks inside one event

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