{ "_args": [ [ { "raw": "binaryheap@>= 0.0.3", "scope": null, "escapedName": "binaryheap", "name": "binaryheap", "rawSpec": ">= 0.0.3", "spec": ">=0.0.3", "type": "range" }, "/srv/demos/node_modules/native-dns-cache" ] ], "_from": "binaryheap@>=0.0.3", "_id": "binaryheap@0.0.3", "_inCache": true, "_location": "/binaryheap", "_npmUser": { "name": "tjfontaine", "email": "tjfontaine@gmail.com" }, "_npmVersion": "1.2.14", "_phantomChildren": {}, "_requested": { "raw": "binaryheap@>= 0.0.3", "scope": null, "escapedName": "binaryheap", "name": "binaryheap", "rawSpec": ">= 0.0.3", "spec": ">=0.0.3", "type": "range" }, "_requiredBy": [ "/native-dns-cache" ], "_resolved": "https://registry.npmjs.org/binaryheap/-/binaryheap-0.0.3.tgz", "_shasum": "0d6136c84e9f1a5a90c0b97178c3e00df59820d6", "_shrinkwrap": null, "_spec": "binaryheap@>= 0.0.3", "_where": "/srv/demos/node_modules/native-dns-cache", "author": { "name": "Timothy J Fontaine", "email": "tjfontaine@gmail.com", "url": "http://atxconsulting.com" }, "bugs": { "url": "http://github.com/tjfontaine/node-binaryheap/issues" }, "dependencies": {}, "description": "A simple binary heap", "devDependencies": { "tap": ">= 0.4.0" }, "directories": {}, "dist": { "shasum": "0d6136c84e9f1a5a90c0b97178c3e00df59820d6", "tarball": "https://registry.npmjs.org/binaryheap/-/binaryheap-0.0.3.tgz" }, "engines": { "node": ">= 0.6.0" }, "homepage": "http://github.com/tjfontaine/node-binaryheap", "keywords": [ "balanced", "binary", "heap", "minheap", "maxheap" ], "main": "binaryheap.js", "maintainers": [ { "name": "tjfontaine", "email": "tjfontaine@gmail.com" } ], "name": "binaryheap", "optionalDependencies": {}, "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", "repository": { "type": "git", "url": "git+ssh://git@github.com/tjfontaine/node-binaryheap.git" }, "scripts": { "test": "node test" }, "version": "0.0.3" }