| Version | Date |
|---|---|
| 3.1.2 | April 2024 |
| 3.1.1 | April 2024 |
| 4.0.0 | October 2021 |
| 3.1.0 | April 2022 |
| 3.0.0 | October 2021 |
3.1.2 (2024-04-26)
- point towards the CommonJS types (e6aa1a3)
3.1.1 (2024-04-10)
This release contains a rework of the dual CommonJS/ES packages. Instead of relying on the .mjs file extension, which causes some problems, we will use two package.json files, one with "type": "commonjs" and the other with "type": "module".
4.0.0 (2022-11-22)
emitReserved() is renamed to _emitReserved() in order to enable proper mangling.
New syntax:
import { Emitter } from "@socket.io/component-emitter";
class MyEmitter extends Emitter {
foo() {
this._emitReserved("input");
}
}3.1.0 (2022-04-17)
- add ESM version (54468cf)
3.0.0 (2021-10-14)
- add support for typed events (84397cb)
- we now use a named export instead of a default export
// before
import Emitter from "@socket.io/component-emitter"
// after
import { Emitter } from "@socket.io/component-emitter"- removed bower support
- expose emitter on
exports - prevent de-optimization from using
arguments
- enable client side use
- prefix events with
$to support object prototype method names
- republish for npm
- add LICENSE file
- package: rename to "component-emitter"
- package: update "main" and "component" fields
- Add license to Readme (same format as the other components)
- created .npmignore
- travis stuff
- fix .once adding .on to the listener
- docs: Emitter#off()
- component: add
.repoprop
- add
.addEventListener()and.removeEventListener()aliases
- add support for legacy ie
- add
.off()support for removing all listeners
- add
this._callbacksinitialization to prevent funky gotcha
- fix
Emitter.call(this)usage
- add
.listeners() - rename
.has()to.hasListeners()
- fix
.off()with.once()-registered callbacks