priority-queue-ts
v0.4.1
Published
JavaScript based priority queue
Downloads
4
Readme
priority-queue-ts
A simple priority queue data structure for Node.js and the browser written in TypeScript.
Installation
As npm for Node.js:
$ npm install priority-queue-ts
If you just want a pre-built file for using in the web, check the releases section.
Example
import {
MinPriorityQueue,
MaxPriorityQueue,
QueueItem } from 'priority-queue-ts';
class Item extends QueueItem {
public value = 1;
public label = 'one';
}
let queue = new MinPriorityQueue();
let item = new Item();
queue.push(item);
Licence
MIT