tinyqueue is a lightweight, efficient JavaScript library providing a binary heap-based priority queue data structure. Currently at version 3.0.0, it offers fundamental operations like `push`, `pop`, and `peek` with minimal overhead. The library's core design prioritizes simplicity and a small bundle size, distinguishing it from more feature-rich or specialized queue implementations. It supports custom comparison functions, allowing users to define priority based on object properties rather than just raw values. While release cadence is not strictly regular, it sees updates for performance improvements and compatibility, with the most recent major update (v3.0.0) shifting to an ES module-only distribution.
No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Since v3.0.0, tinyqueue is published exclusively as an ES module. CommonJS `require()` is no longer supported and will result in an error in modern Node.js environments. TypeScript types are bundled and automatically available for this default export.
Demonstrates how to initialize a TinyQueue, add elements, retrieve the highest priority item, inspect the queue's length, and use custom comparators for complex objects, including how to turn a queue into a sorted array.
Breaking-change detection hasn't run for this library yet.
CVE tracking and dependency tree are planned for a later release.
No traffic data recorded yet.