A generic priority queue implementation based on a binary heap with an efficient updateKey operation, version 0.0.1. Release cadence is currently unknown as it's a new package. Key differentiator vs other priority queues: it supports updating the key of an element after insertion, which is essential for algorithms like Dijkstra's or A* pathfinding where priorities change incrementally. Built primarily for the jKstra graph library but generally useful.
npm install updatable-priority-queueNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage: insert, peek, pop, and updateKey operations on the priority queue.
Store the same object reference or use primitive values that can be compared with ===.
Ensure each item is unique before insertion, or check if the item already exists (though no contains() method).
Manually track items with a Set or Map, or extend the queue with a contains() method.
Use import PriorityQueue from 'updatable-priority-queue'; or use dynamic import in CommonJS.
Check import statement and ensure the module is loaded correctly; use default import.
Ensure that the item you pass to updateKey is the exact same object/primitive that was inserted.
No dependency data recorded yet.