EventEmitter3 - Because there's also a number 2. And we're faster.
MIT License
Bot releases are hidden (Show)
Published by lpinca over 9 years ago
We added a minor feature in this release.
The EventEmitter
constructor now has a prefixed
property which lets you know what is the character used to prefix the event names. This property is set to false when Object.create()
is available.
var prefix = require('eventemitter3').prefixed;
console.log(prefix);
Published by lpinca over 9 years ago
This release brings back the performances of version 0.1.6
without sacrificing features and safety.
Published by 3rd-Eden over 9 years ago
This releases brings support for using ES6 Symbols for event names!
Published by 3rd-Eden over 9 years ago
The way we export the module is changed. For legacy reasons we also supported .EventEmitter
property on the returned eventemitter3
object but this has been completely removed. So your previous:
var EventEmitter = require('eventemitter3').EventEmitter;
Should be changed to:
var EventEmitter = require('eventemitter3');
In addition to that we've made a breaking change the internal argument order of the removeListener
api. Historically we used the third argument as indication that only once
listeners but we've changed to allow the third argument to be used as context
argument as we could also remove listeners based on the context.
Other than that, we added support for a second argument in the listeners
API. Happy hacking.
Published by 3rd-Eden almost 11 years ago
First, a new feature. I've added support for context based emits by adding a third context param to on
and once
as illustrated by this example:
var e = new EventEmitter();
e.on('event', function () {
this === context
}, context);
In addition to that, I've detected a critical bug that cause the complete events object to be erased when one of the events was added using .once.