{"_id":"binaryheap","_rev":"9-59e332d6faf27780648b6b4d61436b35","name":"binaryheap","description":"A simple binary heap","dist-tags":{"latest":"0.0.3"},"versions":{"0.0.1":{"name":"binaryheap","version":"0.0.1","author":{"name":"Timothy J Fontaine","email":"tjfontaine@gmail.com","url":"http://atxconsulting.com"},"description":"A simple binary heap","keywords":["balanced","binary","heap","minheap","maxheap"],"homepage":"http://github.com/tjfontaine/node-binaryheap","bugs":{"url":"http://github.com/tjfontaine/node-binaryheap/issues"},"repository":{"type":"git","url":"http://github.com/tjfontaine/node-binaryheap.git"},"main":"binaryheap.js","engines":{"node":">= 0.6.0"},"readme":"BinaryHeap\n==========\n\nBasic binary heap tree using linked lists\n\nUsage\n-----\n\n```javascript\nvar BinaryHeap = require('binaryheap');\nvar heap = new BinaryHeap();\n\nvar a = [6, 5, 3, 1, 8, 7, 2, 4];\n\na.forEach(function (k) {\n  heap.insert({ value: k }, k);\n});\n\nheap.print();\n\nwhile (heap.length) {\n  console.log('popping', heap.pop().value);\n}\n```\n\nBy default it stores as a max-heap, if you pass truthy to the constructor though\nit will behave as a min-heap.\n\nMethods\n-------\n\n * `insert(obj, key)` -- obj can be any new or existing object, and key is any\nvalue that behaves sanely with `>` or `<`\n * `pop()` -- removes and returns the maximum or minimum object from the root\nof the heap\n * `remove(obj)` -- removes a previously inserted object from the heap\n * `print()` -- mostly for debugging purposes prints a graphviz dot style\ndigraph to confirm ordering\n\nMembers\n-------\n\n * `length` -- number of objects currently in the heap\n","_id":"binaryheap@0.0.1","dist":{"shasum":"b512028e0f9c55fc1825ba0b788e74e356815b5a","tarball":"https://registry.npmjs.org/binaryheap/-/binaryheap-0.0.1.tgz","integrity":"sha512-NZjCMWJ2G/HJQh/IRuTx2XC3yMtqeqnMvg8fFsSRgw8hk/YN9zKt+1ZoM9pia1N5xPWe6KSmESf7g9g5xeO0DA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICLagejSB+KVAtGxrEJcUSOsBZCJOO1Zp3nvN+4ZyDgWAiEA8FuRDjvsBQpn4WMEiBflLA0tIE/E96dS4lpWgAT1fv8="}]},"_npmVersion":"1.1.59","_npmUser":{"name":"tjfontaine","email":"tjfontaine@gmail.com"},"maintainers":[{"name":"tjfontaine","email":"tjfontaine@gmail.com"}]},"0.0.2":{"name":"binaryheap","version":"0.0.2","author":{"name":"Timothy J Fontaine","email":"tjfontaine@gmail.com","url":"http://atxconsulting.com"},"description":"A simple binary heap","keywords":["balanced","binary","heap","minheap","maxheap"],"homepage":"http://github.com/tjfontaine/node-binaryheap","bugs":{"url":"http://github.com/tjfontaine/node-binaryheap/issues"},"repository":{"type":"git","url":"http://github.com/tjfontaine/node-binaryheap.git"},"main":"binaryheap.js","engines":{"node":">= 0.6.0"},"readme":"BinaryHeap\n==========\n\nBasic binary heap tree using linked lists\n\nUsage\n-----\n\n```javascript\nvar BinaryHeap = require('binaryheap');\nvar heap = new BinaryHeap();\n\nvar a = [6, 5, 3, 1, 8, 7, 2, 4];\n\na.forEach(function (k) {\n  heap.insert({ value: k }, k);\n});\n\nheap.print();\n\nwhile (heap.length) {\n  console.log('popping', heap.pop().value);\n}\n```\n\nBy default it stores as a max-heap, if you pass truthy to the constructor though\nit will behave as a min-heap.\n\nMethods\n-------\n\n * `insert(obj, key)` -- obj can be any new or existing object, and key is any\nvalue that behaves sanely with `>` or `<`\n * `pop()` -- removes and returns the maximum or minimum object from the root\nof the heap\n * `remove(obj)` -- removes a previously inserted object from the heap\n * `print()` -- mostly for debugging purposes prints a graphviz dot style\ndigraph to confirm ordering\n\nMembers\n-------\n\n * `length` -- number of objects currently in the heap\n","readmeFilename":"README.md","_id":"binaryheap@0.0.2","dist":{"shasum":"78daba867acdb8f90f2e345c1045afc05520468c","tarball":"https://registry.npmjs.org/binaryheap/-/binaryheap-0.0.2.tgz","integrity":"sha512-8sWUet/fbiUq/qTt3FAyXi7+hOes34+nQwmqh4EHvh5kGENMW73AR2G7FT01zFUqHZJXnpQKgv3NELVVWt/OCg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCG9KSRbULKQIzY1eXqzzs1aBe7vB2VTY/A6hfBEOP8ogIhAKmlCle+x7G9Z90f44l/NwAlRjk8uOH1QB6eZJjIq1AH"}]},"_npmVersion":"1.1.69","_npmUser":{"name":"tjfontaine","email":"tjfontaine@gmail.com"},"maintainers":[{"name":"tjfontaine","email":"tjfontaine@gmail.com"}]},"0.0.3":{"name":"binaryheap","version":"0.0.3","author":{"name":"Timothy J Fontaine","email":"tjfontaine@gmail.com","url":"http://atxconsulting.com"},"description":"A simple binary heap","keywords":["balanced","binary","heap","minheap","maxheap"],"homepage":"http://github.com/tjfontaine/node-binaryheap","bugs":{"url":"http://github.com/tjfontaine/node-binaryheap/issues"},"repository":{"type":"git","url":"http://github.com/tjfontaine/node-binaryheap.git"},"main":"binaryheap.js","engines":{"node":">= 0.6.0"},"scripts":{"test":"node test"},"devDependencies":{"tap":">= 0.4.0"},"readme":"BinaryHeap\n==========\n\nBasic binary heap tree using linked lists\n\nUsage\n-----\n\n```javascript\nvar BinaryHeap = require('binaryheap');\nvar heap = new BinaryHeap();\n\nvar a = [6, 5, 3, 1, 8, 7, 2, 4];\n\na.forEach(function (k) {\n  heap.insert({ value: k }, k);\n});\n\nheap.print();\n\nwhile (heap.length) {\n  console.log('popping', heap.pop().value);\n}\n```\n\nBy default it stores as a max-heap, if you pass truthy to the constructor though\nit will behave as a min-heap.\n\nMethods\n-------\n\n * `insert(obj, key)` -- obj can be any new or existing object, and key is any\nvalue that behaves sanely with `>` or `<`\n * `pop()` -- removes and returns the maximum or minimum object from the root\nof the heap\n * `remove(obj)` -- removes a previously inserted object from the heap\n * `print()` -- mostly for debugging purposes prints a graphviz dot style\ndigraph to confirm ordering\n\nMembers\n-------\n\n * `length` -- number of objects currently in the heap\n","readmeFilename":"README.md","_id":"binaryheap@0.0.3","dist":{"shasum":"0d6136c84e9f1a5a90c0b97178c3e00df59820d6","tarball":"https://registry.npmjs.org/binaryheap/-/binaryheap-0.0.3.tgz","integrity":"sha512-9JFb4Yt5R9FZwbJaxOayF+T5sxn5eiU2NA9/LOeI1g2FUFRTdxpdmWppikO4O5AbNze8s0sL6ZuFxB1y4Ay8GA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDR3apn/ufkBYrVmiMwgMIoq3aeLOBAEydHGUd6T6t2+gIgak1D6pNkVDIEPXdCRQO4oR7Tp357D9m18eCVOsgm06M="}]},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"tjfontaine","email":"tjfontaine@gmail.com"},"maintainers":[{"name":"tjfontaine","email":"tjfontaine@gmail.com"}]}},"readme":"BinaryHeap\n==========\n\nBasic binary heap tree using linked lists\n\nUsage\n-----\n\n```javascript\nvar BinaryHeap = require('binaryheap');\nvar heap = new BinaryHeap();\n\nvar a = [6, 5, 3, 1, 8, 7, 2, 4];\n\na.forEach(function (k) {\n  heap.insert({ value: k }, k);\n});\n\nheap.print();\n\nwhile (heap.length) {\n  console.log('popping', heap.pop().value);\n}\n```\n\nBy default it stores as a max-heap, if you pass truthy to the constructor though\nit will behave as a min-heap.\n\nMethods\n-------\n\n * `insert(obj, key)` -- obj can be any new or existing object, and key is any\nvalue that behaves sanely with `>` or `<`\n * `pop()` -- removes and returns the maximum or minimum object from the root\nof the heap\n * `remove(obj)` -- removes a previously inserted object from the heap\n * `print()` -- mostly for debugging purposes prints a graphviz dot style\ndigraph to confirm ordering\n\nMembers\n-------\n\n * `length` -- number of objects currently in the heap\n","maintainers":[{"name":"tjfontaine","email":"tjfontaine@gmail.com"}],"time":{"modified":"2022-06-13T04:38:26.551Z","created":"2012-09-19T23:59:47.946Z","0.0.1":"2012-09-19T23:59:49.033Z","0.0.2":"2012-12-28T00:53:53.631Z","0.0.3":"2013-03-24T23:41:10.707Z"},"author":{"name":"Timothy J Fontaine","email":"tjfontaine@gmail.com","url":"http://atxconsulting.com"},"repository":{"type":"git","url":"http://github.com/tjfontaine/node-binaryheap.git"}}