Simple-in-memory-queue v1.1.7 is a lightweight in-memory queue library for Node.js (>=8) and browser environments, written in TypeScript with included type definitions. It provides basic queue operations (push, pop, peek) and event subscriptions, along with built-in consumer patterns: debounce, batch, and resilient remote consumer with retries and backpressure. Unlike heavier alternatives like Bull or Bee-Queue, it requires no external storage or message broker, making it ideal for simple client-side or server-side queuing needs. The library is actively maintained with frequent releases.
npm install simple-in-memory-queueNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic queue creation with FIFO order, push/pop/peek operations, and event subscription.
Use pop(1) for an array of one item, or destructure: const [item] = queue.pop();
Pass { order: QueueOrder.FIRST_IN_FIRST_OUT } explicitly.To push an array as a single item, wrap it: queue.push([myArray]);
Use correct import: import { createQueue } from 'simple-in-memory-queue';Create the queue first: const queue = createQueue(...); then queue.on.push.subscribe(...);
No dependency data recorded yet.