interval-queue is a lightweight Node.js utility library (v1.0.4) for managing periodic task execution. It provides a simple API to create, delete, and clear intervals with time units in milliseconds, seconds, minutes, or hours. Unlike raw setInterval, it offers centralized management and typed return values. Actively maintained with TypeScript types included. Suitable for scheduling repeated tasks in server-side applications.
npm install interval-queueNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a 2-second interval, deletes it after 10 seconds, and clears all intervals after 15 seconds.
Use named imports like `import { createInterval } from 'interval-queue'`.Call clearIntervals() before process exit or in cleanup hooks (e.g., process.on('exit', clearIntervals)).Store the return value of createInterval and pass it to deleteInterval.
N/A
Replace `import createInterval from 'interval-queue'` with `import { createInterval } from 'interval-queue'`.Change to ES module import or use destructuring: `const { deleteInterval } = require('interval-queue')` does not work; switch to `import { deleteInterval } from 'interval-queue'`.Ensure you pass the exact object returned by createInterval (or createIntervalSecond, etc.).
No dependency data recorded yet.