bus-plus
v0.2.3
Published
bus bus-plus 公交车 mitter 事件订阅 事件发布
Downloads
37
Readme
bus-plus
- 用法和mitter方向保持一致
import { BusPlus } from 'bus-plus';
const mitter = new BusPlus();
mitter.on('message', function(data) {
console.log(data); // test data
});
mitter.once('test', function(data) {
});
// 支持链式调用
mitter.emit('message', 'test data')
.off('message');
extends
import { BusPlus } from 'bus-plus';
class MyBus extends BusPlus {
construct() {
}
}