Skip to content

Releases: niklasramo/eventti

4.0.0

04 Feb 20:57
58e6a40
Compare
Choose a tag to compare

What's Changed

Full Changelog: 3.0.0...4.0.0

3.0.0

19 Aug 22:23
f55c594
Compare
Choose a tag to compare
  • 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

29 May 20:57
Compare
Choose a tag to compare

Updates

  • Change tsconfig.json target from ESNext to ES6.

2.0.0

12 May 22:02
Compare
Choose a tag to compare

Updates

  • Slightly improved performance in some scenarios -> replaced for of loops with forEach.
  • 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 clears once listeners. It's extremely useful for scenarios where you want to emit multiple events simultaneously in a batch.
  • Improved tests.

Breaking changes

  • Removed submodules (eventti/emitter and eventti/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

30 Apr 22:22
Compare
Choose a tag to compare

It's born :)