A lightweight, customizable priority queue for promise-based tasks, built on a heap data structure. Version 1.0.1 is current, with TypeScript types included. It allows developers to define custom priority logic via a comparator function. Tasks are scheduled with arguments and a priority object; the queue executes tasks in order, returning a promise for each. Lightweight alternative to bulkier job queues, ideal for in-memory async task management.
npm install task-easyNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a TaskEasy queue with a custom priority comparator, schedules five tasks with different priorities, and awaits all.
Pass a larger maxTasks as second argument to constructor, e.g., new TaskEasy(prioritize, 500).
Ensure all tasks are async functions or explicitly return a promise.
Use strict true/false returns in comparator.
No immediate fix; monitor releases for changes.
Use named import: import { TaskEasy } from 'task-easy'Increase maxTasks in constructor or wait for tasks to complete before scheduling more
Pass a comparator function as first argument: new TaskEasy(prioritize)
Ensure task is async or returns a promise explicitly
No dependency data recorded yet.