@snapback/events
v1.0.2
Published
Event bus for SnapBack inter-process communication
Maintainers
Readme
@snapback/events
Event bus and event types for SnapBack.
Installation
npm install @snapback/eventsWhat's Included
- Event bus: Publish/subscribe event system
- Event types: TypeScript types for all SnapBack events
- Event handlers: Standard patterns for event processing
Quick Start
import { eventBus } from "@snapback/events";
// Subscribe to events
eventBus.on("snapshot.created", (event) => {
console.log("Snapshot created:", event.snapshotId);
});
// Publish events
await eventBus.emit("snapshot.created", {
snapshotId: "snap-123",
timestamp: Date.now(),
});API Reference
See documentation for complete API reference.
Development
pnpm build
pnpm testLicense
MIT
