{"name":"tinyqueue","version":"2.0.1","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":"b023ac5f2f5dc5c3185ae2b184823b76f6ea7260","_id":"tinyqueue@2.0.1","_nodeVersion":"10.15.2","_npmVersion":"6.9.0","dist":{"integrity":"sha512-7KuuEGo3XezCTqf9GBwKgx3SrkKObvNHwRhSTA/0zR2we0/tisX3VQAydOS1BuEmDB6DvpNfxxzreUVPm+Lrxg==","shasum":"35437e08f069842d660275dcc095d3a399e98e10","tarball":"http://registry-npm.ywwl.com/tinyqueue/download/tinyqueue-2.0.1.tgz","fileCount":7,"unpackedSize":8712,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcpyD+CRA9TVsSAnZWagAAJHQP/j28JDOEnisnWMNqsYyd\naqQINhHwS5ir6Mh5MMxCmhm/Jjxf02gtkHzXLoygPouj91U5wp2HoF9Y10G/\nwoQ03OWAOlFj8+gWbb1fH0FVrE1gv4QjBiQ8FB5YzobfcWSknGL1qgNA5NX3\nA3+p4XmeB1+2g215yNPZdRVjanwAGbF1m20Lew++YAA8rQv1cpvDiBkhGwd+\nEqnpmi44kDlKsthNwOgISIZm1/VMwTb2SgVq9Mh9nItbULmfJXkxiHRbjiHN\n3epjfwTcsxYPLqBQs5+1kWpW/KmHn3LxVVmstfdPXbpW+QdVP8DYWPwv+wEN\nSmbRvPMKzgdvumJ4l65Ac1Orkpo6ldxubVG77jCOGNe1mcVyL643idKjFu1Y\nc1bok3JNU1yAt76Mq+ArwEjBEqmIPdQUdcnxAPce1tra2H7+bU9yOF7LuC0+\n3Iei4ZrO/OJTLR2KYUDNgGTWL3gtmp1OYXzgNWpUdoQPe+nNBce1uhwS8jTl\npz+Qd+jpV9Q61UfNnNeHpoL83HPYYF5SF3OQ3h7BtEVRUIWNX4Npg3JGNIvZ\nnLF2THaIceP+8eQr8BNZl1q6Nfi8pD4jDyYtjd9YoQBr/9Wx6srGY7zPQ4KK\n3LweNw2UaIFtJklMMbtQDrKg8Mz6stxRj0b//OiwlIH4J8tO+DMDjzvT6CCO\n89ri\r\n=hh0J\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEMCICEPZRwpYx/VHXsK2GWKYQv3VkA6+ijvQpjr/s0qkMg4Ah90vidbc336gTpIlLW3a0y+r5tBxP2L3NWjHClhhNTZ"}],"size":3306,"noattachment":false,"key":"/tinyqueue/-/tinyqueue-2.0.1.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.1_1554456829638_0.6519508076704528"},"_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":1554456829744,"_cnpm_publish_time":1554456829744,"dist-tags":{"latest":"3.0.0"}}