1.0.0 • Published 4 years ago

@gotoeasy/bus v1.0.0

Weekly downloads
21
License
MIT
Repository
github
Last release
4 years ago

@gotoeasy/bus

simple event bus

NPM version License

Install

npm i @gotoeasy/bus

API

const bus = require('@gotoeasy/bus');

bus.on('input', function(txt){
    console.log('input ...', txt);
})
bus.once('once', function(txt){
    console.log('once ...', txt);
})

bus.at('input', 'abc'); // input ... abc

bus.at('once', '123'); // once ... 123
bus.at('once', '123'); // do nothing

bus.off('input');
bus.at('input', 'abc'); // do nothing

bus.clear();            // clear all events

Links

1.0.0

4 years ago

0.2.1

5 years ago

0.1.0

5 years ago

0.0.15

5 years ago

0.0.14

5 years ago

0.0.13

5 years ago

0.0.12

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago