pending-queue
JSON →A lightweight queue that ensures a given asynchronous function (load) is executed only once for a given set of parameters, while multiple callers can await the result. Version 1.2.1 is the latest stable release. The package is minimal (zero dependencies) and designed for Node.js 4+. It provides an EventEmitter-based API and custom key serialization via stringify. Use cases include deduplicating API calls, database queries, or any expensive async operation. Unlike similar deduplication utilities, pending-queue queues listeners rather than memoizing results, making it suitable for one-shot or short-lived caching.
Resources
packagepending-queue ↗