
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@baileyherbert/events
Advanced tools
This is an alternative event emitter that works on all platforms. It allows you to specify the event types, and keeps
the emit
method protected.
npm install @baileyherbert/events
Extend the EventEmitter
class and provide an enumeration of tuples for <T>
:
import { EventEmitter } from '@baileyherbert/events';
export class Chat extends EventEmitter<Events> {
protected _onUserConnected(user: User) {
this.emit('connected', user.username);
}
}
type Events = {
/**
* These JSDoc comments will show up in intellisense too!
*/
chat: [username: string, message: string];
connected: [username: string];
disconnected: [username: string];
};
Then you can listen to those events like usual, but with autocompleted event names and typed arguments. 👍
const chat = new Chat();
chat.on('connected', username => {});
chat.on('disconnected', username => {});
chat.on('chat', (username, message) => {});
FAQs
A strongly typed event emitter.
The npm package @baileyherbert/events receives a total of 35 weekly downloads. As such, @baileyherbert/events popularity was classified as not popular.
We found that @baileyherbert/events 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.