Wolfy87/EventEmitter — Issue #10: Match the node.js API
Author: Raynos
Created: 2011-10-17 11:16:07+00:00
State: open

There are still some differences between your API and the node core API.

Namely - [removeListeners][1] which will remove all listeners of any type if type is not passed

There is also no notion of [maxListeners][2] in your code base. This is probably useful for the same reasons it is useful in node. Basically making memory leaks easy to identify. (adding listeners but forgetting to remove them)

Reasons for matching the node.js API is code portability.

[1]: http://nodejs.org/docs/v0.5.9/api/events.html#emitter.removeAllListeners
[2]: http://nodejs.org/docs/v0.5.9/api/events.html#emitter.setMaxListeners