Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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
  • Socket score

Version published
Weekly downloads
5
increased by400%
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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc