onfire.js

一个迷你版(~ 500b)的事件订阅和发布的库,简单实用。

Build Status npm

中文文档 English Doc

安装

npm i –save onfire.js

使用

import EE from 'onfire.js';

const ee = new EE();

ee.on('mouseover', () => {});

ee.once('click', () => {});

ee.fire('click', 1, 'hello', true);

ee.off('click');

API 文档

非常简单,类似于 event-emitter

使用场景

License

MIT@hustcc.