@elserlabs/events
v0.0.3
Published
A lightweight, RxJS-powered event bus system for JavaScript and TypeScript applications.
Readme
@elserlabs/events
A lightweight, RxJS-powered event bus system for JavaScript and TypeScript applications.
Features
- 🚀 Built on RxJS for powerful reactive programming
- 💪 TypeScript support out of the box
- 🎯 Simple API with EventEmitter pattern
- 📦 Tree-shakeable and lightweight
- 🔄 Universal module support (ESM and UMD)
Installation
npm install @elserlabs/events
Usage
import { dispatch, subject, filter } from "@elserlabs/events";
// Subscribe to specific events
subject
.pipe(filter((event) => event.key === "notification"))
.subscribe((event) => {
console.log("Notification received:", event.value);
});
// Dispatch events
dispatch("notification", { message: "Hello World!" });License
MIT © Design Combo
