
Research
Node.js Fixes AsyncLocalStorage Crash Bug That Could Take Down Production Servers
Node.js patched a crash bug where AsyncLocalStorage could cause stack overflows to bypass error handlers and terminate production servers.
bucket-priority-queue
Advanced tools
BucketQueue is a priority queue implementation ideal for algorithms requiring efficient, priority-based item
management, such as Dijkstra's algorithm. It's designed to offer quick enqueue and dequeue operations, particularly
when the priority key space is small and comprised of positive integers, a common scenario in many programming puzzles.
See Bucket queue on Wikipedia for more.
Compared to other Heap-based priority queue implementations, BucketQueue can offer a significant performance boost
given the right conditions. The following benchmarks - about pop and push operations - were run on a 2021 MacBook Pro
with Apple M1 Max chip, Node.js 20.10.0:
BucketQueue x 49,750,443 ops/sec ±0.14% (101 runs sampled)
HeapJS x 12,203,990 ops/sec ±0.18% (99 runs sampled)
HeapDS x 1,094,289 ops/sec ±0.09% (97 runs sampled)
Heap x 4,401,016 ops/sec ±0.10% (98 runs sampled)
MinPriorityQueue x 25,171,646 ops/sec ±0.09% (95 runs sampled)
PriorityQueue x 15,892,132 ops/sec ±0.07% (96 runs sampled)
For more details, see the benchmark source code.
To install BucketQueue, simply include it in your project dependencies:
npm install bucket-priority-queue
Here's how you can integrate BucketQueue into your project:
import { MinBucketQueue, MaxBucketQueue } from "bucket-priority-queue";
// Initialize the queue with optional initial items
const queue = new MinBucketQueue<number>([
[1, 1],
[2, 2],
[3, 3],
]);
// Adding items with priority
queue.push(5, 1); // item 5 with priority 1
queue.push(6, 2); // item 6 with priority 2
// Retrieve items with the highest or lowest priority
const lowest = queue.pop(); // returns item with lowest priority
MinBucketQueue is a data structure that operates similarly to a priority queue. It organizes elements in a way such that the element with the minimum priority is always at the front.
true if the queue is empty, otherwise returns false.MaxBucketQueue is a data structure that operates similarly to a priority queue. It organizes elements in a way such that the element with the maximum priority is always at the front.
true if the queue is empty, otherwise returns false.This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
Implementation of the bucket queue data structure in TypeScript
The npm package bucket-priority-queue receives a total of 8 weekly downloads. As such, bucket-priority-queue popularity was classified as not popular.
We found that bucket-priority-queue demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
Node.js patched a crash bug where AsyncLocalStorage could cause stack overflows to bypass error handlers and terminate production servers.

Research
/Security News
A malicious Chrome extension steals newly created MEXC API keys, exfiltrates them to Telegram, and enables full account takeover with trading and withdrawal rights.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.