A lightweight queue library for Node.js that manages asynchronous task execution with configurable per-task timeouts and garbage collection of completed tasks. Version 4.0.0 requires Node.js 4+ and ships TypeScript types. Unlike many job queues, plain-queue is in-process, single-threaded, and has no persistence or external dependencies, making it ideal for simple sequential task orchestration. The library supports both promise-returning and synchronous functions, and provides timeout errors when a task exceeds the specified limit. Release cadence is low; the API has been stable since v1.0.2.
npm install plain-queueNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a queue with a 5-second global timeout and 300-task GC threshold, then adds an async task and logs its result.
Ensure Node.js >= 4.0.0, or use plain-queue@3.x for older Node.
Set both global and per-task timeouts explicitly if needed.
Always return a promise for async tasks.
No action required.
Use destructuring: const { Queue } = require('plain-queue');Increase timeout in queue options or per-task options, or reduce task execution time.
Run npm install plain-queue and check import: import { Queue } from 'plain-queue';No dependency data recorded yet.