Releases: niklasramo/eventti
Releases · niklasramo/eventti
4.0.0
3.0.0
- Allow providing listener id manually via a third argument in .on() and .once() methods.
- Add 4 different modes to Emitter to handle duplicate listener ids.
- Add possibility to throw on duplicate listeners in Emitter.
- Improve unit tests (migrate from Ava to Mocha + Chai).
- Improve documentation.
- Remove UniqueEmitter (since Emitter can now do the same thing).
- Remove experiments.
- Update dev dependencies.
2.0.1
Updates
- Change tsconfig.json target from ESNext to ES6.
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.
1.0.0
It's born :)