The compare function to use for sorting the queue.
Default
(a, b) =>a.priority - b.priority
Optionallifo
lifo?:boolean
When true, items with equal priority are dequeued in LIFO order (newest first).
When false (default), items with equal priority are dequeued in FIFO order (oldest first).
The compare function to use for sorting the queue.