Priority Queue
Simple and fast priority queue that uses promise based of while iteration and not blocking the main thread.
Contents
Install
npm i --save simple-priority-queue
Basic Usage
; ; //true for maxheap, default is minheap// enqueue recive 2 params nodeData: any object , nodePriority: priority of datamyQueue.insert, 1;myQueue.insert, 2;myQueue.insert, 3;myQueue.insert, 4;// dequeue by order of the priority; // sort the data (will remove the content of queue);