{"name":"tinyqueue","version":"1.1.0","description":"The smallest and simplest JavaScript priority queue","main":"index.js","scripts":{"test":"eslint index.js test.js && tape test.js"},"repository":{"type":"git","url":"git+https://github.com/mourner/tinyqueue.git"},"keywords":["queue","priority","binary heap","data structures"],"author":"","license":"ISC","bugs":{"url":"https://github.com/mourner/tinyqueue/issues"},"homepage":"https://github.com/mourner/tinyqueue","devDependencies":{"eslint":"^1.10.3","eslint-config-mourner":"^1.0.1","tape":"^4.4.0"},"eslintConfig":{"extends":"mourner"},"gitHead":"4506f90a4d5a0521677e47dd97a379486de72c95","_id":"tinyqueue@1.1.0","_shasum":"9c5f76f54a845f4914e754f5aa8d73ef6c011f7b","_from":".","_npmVersion":"2.14.17","_nodeVersion":"5.5.0","_npmUser":{"name":"mourner","email":"agafonkin@gmail.com"},"dist":{"shasum":"9c5f76f54a845f4914e754f5aa8d73ef6c011f7b","tarball":"http://registry-npm.ywwl.com/tinyqueue/download/tinyqueue-1.1.0.tgz","integrity":"sha512-sy7P00bEea76okYUOvLqxzFebHw152kEXYBcBWb9Pk/fpzsZLFeivgrmZRFbUE/gUZA//CpK+/ba2xLIFhmIgw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEpXVS68gC5ARc23A3tDcnJsNT6wOra/L6+8eKi1DkuAAiB+uavHsVGzjnbRihKBdfuby/J4CpBGTrA29YeK8ZobOg=="}],"size":1771,"noattachment":false,"key":"/tinyqueue/-/tinyqueue-1.1.0.tgz"},"maintainers":[{"name":"mourner","email":"agafonkin@gmail.com"}],"_npmOperationalInternal":{"host":"packages-9-west.internal.npmjs.com","tmp":"tmp/tinyqueue-1.1.0.tgz_1455206382906_0.9365292538423091"},"directories":{},"readme":"## tinyqueue\n\nThe smallest and simplest binary heap priority queue in JavaScript.\n\n```js\n// create an empty priority queue\nvar queue = new TinyQueue();\n\n// add some items\nqueue.push(7);\nqueue.push(5);\nqueue.push(10);\n\n// remove the top item\nvar top = queue.pop(); // returns 5\n\n// return the top item (without removal)\ntop = queue.peek(); // returns 7\n\n// get queue length\nqueue.length; // returns 2\n\n// create a priority queue from an existing array (modifies the array)\nqueue = new TinyQueue([7, 5, 10]);\n\n// pass a custom item comparator as a second argument\nqueue = new TinyQueue([{value: 5}, {value: 7}], function (a, b) {\n\treturn a.value - b.value;\n});\n\n// turn a queue into a sorted array\nvar array = [];\nwhile (queue.length) array.push(queue.pop());\n```\n\nFor a faster number-based queue, see [flatqueue](https://github.com/mourner/flatqueue).\n\n### Install\n\nInstall using NPM (`npm install tinyqueue`) or Yarn (`yarn add tinyqueue`), then:\n\n```js\n// import as an ES module\nimport TinyQueue from 'tinyqueue';\n\n// or require in Node / Browserify\nconst TinyQueue = require('tinyqueue');\n```\n\nOr use a browser build directly:\n\n```html\n<script src=\"https://unpkg.com/tinyqueue@2.0.0/tinyqueue.min.js\"></script>\n```\n\n### Thanks\n\nInspired by [js-priority-queue](https://github.com/adamhooper/js-priority-queue)\nby [Adam Hooper](https://github.com/adamhooper).\n","publish_time":1455206386272,"_cnpm_publish_time":1455206386272,"dist-tags":{"latest":"3.0.0"}}