
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
A minimal, fully-typed, and reactive event emitter for TypeScript and JavaScript.
This lightweight utility provides a simple yet powerful mechanism for handling events in a reactive style. It offers a fully type-safe API, supports multiple listeners, and integrates cleanly with observable patterns without any external dependencies.
EventEmitter – basic event system for emitting and listening to eventsBehaviorEventEmitter – like BehaviorSubject, emits the last value to new subscribersnpm install eonemitter
import { EventEmitter, BehaviorEventEmitter } from 'eonemitter';
// Basic EventEmitter
const emitter = new EventEmitter<string>();
const subscription = emitter.subscribe((value) => {
console.log(value); // Logs: 'Hello!'
});
emitter.emit('Hello!');
subscription.unsubscribe();
// BehaviorEventEmitter emits the latest value to new subscribers
const behaviorEmitter = new BehaviorEventEmitter<number>();
const subscription2 = behaviorEmitter.subscribe((value) => {
console.log(value); // Logs: 777 repeatedly
});
setInterval(() => behaviorEmitter.emit(777), 100);
setTimeout(() => subscription2.unsubscribe(), 500);
const { EventEmitter } = require('eonemitter');
const emitter = new EventEmitter<string>();
emitter.subscribe((value) => {
console.log(value);
});
emitter.emit('Hi from CommonJS!');
EventEmitter - a generic event emitter that allows subscribing to and emitting events of type T. Supports multiple subscribers and provides control over subscription lifecycles.
subscribe(callback: (value: T) => void): ISubscription
// Subscribes to all future events
subscribeOnce(callback: (value: T) => void): ISubscription
// Subscribes to only the next event, then automatically unsubscribes
asObservable(): IObservable<T>
// Returns a read-only observable interface to this emitter.
hasSubscribers(): boolean
// Returns true if there are any active subscribers.
emit(value: T): void
// Emits a new event to all current subscribers
unsubscribeAll(): void
// Removes all active subscribers
BehaviorEventEmitter - extends EventEmitter by storing the most recent value. New subscribers will immediately receive the last emitted value upon subscribing.
getValue(): T
// Returns the most recently emitted value.
IObservable - exposes a interface for subscribing to events
subscribe(callback: (value: T) => void): ISubscription
// Subscribes to all future events.
subscribeOnce(callback: (value: T) => void): ISubscription
// Subscribes to the next emitted event only, then automatically unsubscribes.
ISubscription - represents a subscription to an event stream. Used to manually unsubscribe when needed.
unsubscribe(): void;
// Cancels the subscription.
FAQs
Minimal and type-safe event emitter with optional behavior support.
We found that eonemitter demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.