QueueEventEmitter

JSON →
library 2.1.1 ·javascript
verified Jun 7, 2026

A simple EventEmitter that runs each event handler in a queue, ensuring sequential execution of asynchronous handlers. Version 2.1.1 is stable and uses a Promise-based queue with optional concurrency control. Unlike standard EventEmitter (which fires listeners concurrently), QueueEventEmitter guarantees that handlers for the same event type execute one after another (or with a configurable concurrency limit). This prevents race conditions and ensures predictable ordering of async event processing. The package is lightweight, has no dependencies, and is ideal for workflows where order and sequential execution matter (e.g., database writes, API calls). Maintained with infrequent releases.