Skip to content

Releases: DanmakuTree/ts-event-bus

add error catch if callback fails

23 Jun 12:20
@ax4 ax4
Compare
Choose a tag to compare
v1.0.4

Auto Update with TSC

v1.0.3

09 Jun 12:55
@ax4 ax4
Compare
Choose a tag to compare
Auto Update with TSC

Add .onRaw() support, and alias the .emit() method instead of re-doing it

09 Jun 12:18
@ax4 ax4
Compare
Choose a tag to compare

We add the support for .onRaw() feature.

Let's say:

var a = new eventbus()
a.on('event-name', function(eventname, ...data)) {
  //do some code with eventname and ...data in callback
}

a.onRaw('event-name', function(raw, ...data)) {
  //do some code with raw and ...data in callback
}

And also we revert the last versions' quick copy-pasting style of re-coding and change it into an alias function.

Split the .emit() and .emitContext() method

04 Jun 20:19
@ax4 ax4
Compare
Choose a tag to compare

Just copy, paste, comment, and split the method into two, because we're lazy to call context. This copy-paste is too rude, I should make an alias function instead of doing this.