# jevent

> JS事件管理 jEvent

Latest version **1.1.4** (published 2015-10-06) · ISC license · 0 weekly downloads

## Install

```sh
npm install jevent
pnpm add jevent
yarn add jevent
bun add jevent
```

## 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.1.4 |
| Published | 2015-10-06 |
| First published | 2015-07-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | daifee |
| Maintainers | daifee |
| Keywords | jevent, jEvent, js, event, 事件管理器 |

## Links

- npm: https://www.npmjs.com/package/jevent
- Repository: https://github.com/epooren/jevent
- Homepage: https://github.com/epooren/jevent#readme
- Issues: https://github.com/epooren/jevent/issues
- npm.io page: https://npm.io/package/jevent

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.1.4 (latest) — 2015-10-06
- 1.0.0 (version) — 2015-07-12
- 1.1.1 — 2015-09-05
- 1.1.0 — 2015-09-05
- 1.0.2 — 2015-07-12
- 1.0.1 — 2015-07-12

## README

# jEvent

[![Build Status](https://travis-ci.org/epooren/jevent.svg?branch=master)](https://travis-ci.org/epooren/jevent) [![stable](http://badges.github.io/stability-badges/dist/stable.svg)](http://github.com/badges/stability-badges)

JS事件管理器

---

## INSTANLLATION

```sh
$ npm install jevent --save
```

## USAGE

```js
// var jEvent

jEvent.on('fuck-gfw', function () {
  console.log('one');
});

jEvent.trigger('fuck-gfw');


var obj = {};
$.extend(obj, jEvent);

obj.on('fuck-gfw', function () {
  console.log('again……');
});
obj.trigger('fuck-gfw');

// show in console
// one
// again……
```

**注意：** `obj`与`jEvent`分别绑定的事件互不干扰，所以不会出现打印`one`


## API

* `jEvent.on(event, handler[, obj])`
* `jEvent.one(event, handler[, obj])`
* `jEvent.trigger(event)`
* `jEvent.off([event[, handler[, obj]]])`
* `jEvent.on(event, handler[, obj])`
* `jEvent.change(mix[, obj])`
* `jEvent.offChange([handler[, obj]])`

详情看源码（jevent.js）

## LICENSE

MIT

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