0.2.3 • Published 1 year ago

bus-plus v0.2.3

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

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() {
        
    }
}
0.2.3

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago