
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.
@andrash/event-utils
Advanced tools
Common utils for NestJS Projects. These tools are gathered form my old NestJS projects so that I can use them in my future projects.
This is a handy tool that I used to handle events in my projects.
AnyEventEmitter is a wrapper around the native EventTarget for providing better type safety and utility methods.
You can also define your own event types by implementing the IEventDef interface, and pass to AnyEvent as a generic type parameter, which can be used with AnyEventEmitter.
I extracted this tool from my older projects, so I can use it in my future projects.
pnpm add event-utils
import { AnyEventEmitter, AnyEvent, IEventDef } from "event-utils";
// Define your own event type
interface MessageEvent {
type: "message";
data: { content: string; sender: string };
}
// Define your own event emitter
class MessageReceiver extends AnyEventEmitter {
public receive(message: string, sender: string) {
this.emit<MessageEvent>(
new AnyEvent("message", { content: message, sender })
);
}
}
// Use the event emitter
const receiver = new MessageReceiver();
// Listen for the message event
receiver.on<MessageEvent>("message", (event) => {
console.log(
`Received message from ${event.data.sender}: ${event.data.content}`
);
});
// Trigger the event
receiver.receive("Hello, World!", "Alice");
// Output: Received message from Alice: Hello, World!
FAQs
Common utils for NestJS Projects. These tools are gathered form my old NestJS projects so that I can use them in my future projects.
We found that @andrash/event-utils demonstrated a healthy version release cadence and project activity because the last version was released less than 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.