2.0.0
Updates
- Slightly improved performance in some scenarios -> replaced
for of
loops withforEach
. - New method:
.listenerCount( eventName )
. - New protected method:
._getListeners( eventName )
.- This method does everything what
.emit()
does except the actual emitting. It caches (and returns) the listeners and clearsonce
listeners. It's extremely useful for scenarios where you want to emit multiple events simultaneously in a batch.
- This method does everything what
- Improved tests.
Breaking changes
- Removed submodules (
eventti/emitter
andeventti/unique-emitter
) for now as they were not working nicely with TypeScript and because you can easily tree-shake the other emitter if you are not using it.