A couple small suggestions and thoughts:
Add a couple lines so that all methods return this; to allow for chaining, especially helpful when using it as a mixin.
Rename bind/unbind method names since they have completely different meanings/uses in ES5:
https://developer.mozilla.org/en/JavaScript/Reference/Global...
P.S. If you're down with those changes I'll gladly fork, update and send a pull req, although not sure what you'd want to rename the api too.
your point on api name is good. which name would you suggest ? something standard and readable and im sold :)
subscribe/unsubscribe/publish
and also added return this.
https://github.com/amadeus/microevent.js
A couple small suggestions and thoughts:
Add a couple lines so that all methods return this; to allow for chaining, especially helpful when using it as a mixin.
Rename bind/unbind method names since they have completely different meanings/uses in ES5:
https://developer.mozilla.org/en/JavaScript/Reference/Global...
P.S. If you're down with those changes I'll gladly fork, update and send a pull req, although not sure what you'd want to rename the api too.