{"name":"tinyqueue","version":"2.0.2","description":"The smallest and simplest JavaScript priority queue","main":"tinyqueue.js","module":"index.js","jsdelivr":"tinyqueue.min.js","unpkg":"tinyqueue.min.js","types":"index.d.ts","scripts":{"lint":"eslint index.js test.js bench.js rollup.config.js","pretest":"npm run lint","test":"tape -r esm test.js","bench":"node -r esm bench.js","build":"rollup -c","watch":"rollup -cw","prepublishOnly":"npm test"},"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":"^5.16.0","eslint-config-mourner":"^3.0.0","esm":"^3.2.22","rollup":"^1.9.0","rollup-plugin-buble":"^0.19.6","rollup-plugin-terser":"^4.0.4","tape":"^4.10.1"},"eslintConfig":{"extends":"mourner"},"gitHead":"649fca0fa24c9e8410c45365c809f852fa055c8e","_id":"tinyqueue@2.0.2","_nodeVersion":"10.15.2","_npmVersion":"6.9.0","dist":{"integrity":"sha512-1oUV+ZAQaeaf830ui/p5JZpzGBw46qs1pKHcfqIc6/QxYDQuEmcBLIhiT0xAxLnekz+qxQusubIYk4cAS8TB2A==","shasum":"b4fe66d28a5b503edb99c149f87910059782a0cc","tarball":"http://registry-npm.ywwl.com/tinyqueue/download/tinyqueue-2.0.2.tgz","fileCount":7,"unpackedSize":8714,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcp14jCRA9TVsSAnZWagAA5y4P+wWR3oSbFTgmraJxJcRa\ncajrreZHEu0FXDQArpkH8oktDL6rQwfWbWE0PNbnAd6rc7fj7s+wSrxmz6sw\n7e1Hw+fnnxXYqbEKBWf8D/t+CHZC7hPcQnIs+fmlJk5fyX6ae3sqf3eBY/o+\nsU26lEn8yU0a/dQGNUy8ST4F9B2eBhhN1QYd1E3gkyAvcRy86nis6QZfWOmV\nFxpz4np8QIiW5AIIShf5UJdis3Uzlbu1ZT/+HAARGobf+s57ZdGYPD1PunNm\nYAx2nftWPGTsXGW43gb3ZY1EkmRPj5eFo9LqcLNs508oUb7hgUJpfJRe0Xyp\nhj/6u+tCfsF4KjSWHKPJT8KtLiORTA0aSJgPhRzsSBWJDXq9MkDRmRFByj1P\nAuZAt5LQZn2ahf1lwl/d/39Tr/9Ir1mPz+7DyThZCRjQSV3dOPXAY5Nz33Mq\n4rcS0lCLqHWKlsmi3QaOopmFKu93r+LBfHm3CztR34v/FdVsLkQisRRDEzHP\n3y2t1KaPnIQ7q+eYGBNIBCIYG4gXdLvq6+IjoY+VL3+1m278C2SLYZ+0sq1x\nN4dyjaYKED03DnR5O1XqO5W/K2i2n5NvQ5DRFIj4SRatB1gpPSTllUm2ju5K\np6Rx5t9Kl1x0plOQ35ChvsyRy/1ugR5SJ4EVDvYXn01OiN/bXnXJ74w9d9M1\nUcHM\r\n=MFit\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC/pwtKB0EwcnfiG3LFuHWAZxGKkUrnoo1MQQyoS8vGDAiBJUXU3szm6N8DhSJO7MKHX+YzNOMYlY57iydLdqC0CAg=="}],"size":3304,"noattachment":false,"key":"/tinyqueue/-/tinyqueue-2.0.2.tgz"},"maintainers":[{"name":"mourner","email":"agafonkin@gmail.com"}],"_npmUser":{"name":"mourner","email":"agafonkin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tinyqueue_2.0.2_1554472482872_0.5738083029656726"},"_hasShrinkwrap":false,"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":1554472482996,"_cnpm_publish_time":1554472482996,"dist-tags":{"latest":"3.0.0"}}