1.1.10 • Published 5 years ago

tinyEmiter v1.1.10

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

tinyEmiter

a tiny emiter util, very easy to understand and use in browser and node.

usage

import Emiter from 'tinyEmiter';

let emiter = new Emiter();

// general methods
emiter.on('start',(start_data) => {
  console.log(start_data);
})
emiter.on('end',(end_data) => {
  console.log(end_data)
})

// params are optional, if eventid is unspecified, it will clear all listeners. if elistener is unspecified, it will clear all listeners associated with this eventid

emiter.off('eventid',elistener)
emiter.off('start');

// bonus, it's very usefull for debugging or handle events wholely.
emiter.on('*', (data) => {
  console.log('all events will be passed into listener also.');
})
1.1.10

5 years ago

1.1.9

5 years ago

1.1.8

6 years ago

1.1.7

6 years ago

1.1.6

6 years ago

1.1.5

6 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago