Skip to content

v2.0.0

Latest
Compare
Choose a tag to compare
@berlysia berlysia released this 04 Nov 14:56
· 194 commits to master since this release
  • Now priorityqueue is dual exported package.
  • Simpler build pipeline thanks to use of Vite & Vitest.

BREAKING CHANGE

Change the import manner of other strategies.

before

import PriorityQueue, { BinaryHeap, SkewHeap, PairingHeap } from "priorityqueue";

console.log(PriorityQueue === BinaryHeap); // true

after

import PriorityQueue from "priorityqueue";
import BinaryHeap from "priorityqueue/BinaryHeap";
import SkewHeapfrom "priorityqueue/SkewHeap";
import PairingHeap from "priorityqueue/PairingHeap";

console.log(PriorityQueue === BinaryHeap); // true

All alias methods are removed

  • instance.peek() -> use instance.top()
  • instance.enqueue(x) -> use instance.push(x)
  • instance.dequeue() -> use instance.pop()