🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

priority_queue

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

priority_queue

simple priority queue using a binary heap

0.0.0
Source
npm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

h1. Priority Queue

A simple javascript priority queue using a binary heap. The compare function has the same semantic as with the @Array.sort()@ function.

h2. Synopsis

bc.. var pq = require('priority_queue');

// create a queue var q = new pq.PriorityQueue(/* compare, array */);

// push some elements q.push(42, 5, 23, Math.PI);

// pop while (q.length > 0) { console.log(q.pop()); }

h2. License

MIT.

FAQs

Package last updated on 07 Mar 2012

Did you know?

Socket

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.

Install

Related posts