
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
event-controller
Advanced tools
Simple JavaScript event controller implementation. Similar to Node.js EventEmitter, but manages a single event type.
EventEmitter.var EventController = require('event-controller');
var event1 = new EventController();
// Add listener
event1.add(function (value) {
// handle event
});
// Dispatch
event1.dispatch('hello');
Interface example:
function MyObject() {
this.onError = new EventController();
this.onReceive = new EventController();
}
var obj = new MyObject();
// Add error handler
obj.onError.add(function() {});
// Dispatch error
obj.onError.dispatch(new Error());
##API
###.add(fn)
Add new event listener.
###.remove(fn)
Remove event listener.
###.dispatch(args...) .raise(args...)
Dispatch new event.
##BENCHMARK
Random benchmark results for 1 event type and 2 listeners .
EventEmitter x 1,269,447 ops/sec ±3.63% (85 runs sampled)
EventController x 3,427,809 ops/sec ±2.19% (88 runs sampled)
Fastest is EventController
##LICENSE
Apache License, Version 2.0
FAQs
Simple JavaScript event controller implementation
We found that event-controller demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.