
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.
t-event-emitter
Advanced tools
TEventEmitter is an enhanced event emitter that supports type-safe event keys. With TEventEmitter, you can create string or symbol keys and ensure type safety when emitting and listening to events.
Here's a quick example demonstrating how to use TEventEmitter to create and handle type-safe events:
import { TEventEmitter } from 't-event-emitter';
// Create a TEventEmitter instance
const emitter = new TEventEmitter();
// Create a event key with typed args
const key = emitter.createKey<[number, string]>('myEvent');
// Listen for the event
emitter.on(key, (num, str) => {
console.log(`Number: ${num}, String: ${str}`);
});
// Emit the event
emitter.emit(key, 42, 'Hello, World!');
// emitter.emit(key, 42, true); <-- Argument of type 'boolean' is not assignable to parameter of type 'string'.
FAQs
A Type-Safe Event Emitter
The npm package t-event-emitter receives a total of 3 weekly downloads. As such, t-event-emitter popularity was classified as not popular.
We found that t-event-emitter 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.