{"_id":"co-priority-queue","_rev":"10-66b396c677eac6c046df6e6acda2a82d","name":"co-priority-queue","description":"A simple priority queue for co","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"co-priority-queue","version":"1.0.0","description":"A simple priority queue for co","author":{"name":"Manuel Vila","email":"mvila@3base.com"},"main":"index.js","repository":{"type":"git","url":"git://github.com/mvila/co-priority-queue"},"license":"MIT","devDependencies":{"co":"~3.0.5"},"bugs":{"url":"https://github.com/mvila/co-priority-queue/issues"},"homepage":"https://github.com/mvila/co-priority-queue","_id":"co-priority-queue@1.0.0","dist":{"shasum":"82a1c5824fadb3d256920eb8df89614cad9ba114","tarball":"https://registry.npmjs.org/co-priority-queue/-/co-priority-queue-1.0.0.tgz","integrity":"sha512-FZ0dBRxnrSWUQMSrzFoOqWrwUk0gOzZOPYq4I4tAs4H2uHTnmJmtPkVHBPisIfQWuDFmbt49MCnKiNjQqKBEQQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGu5XPyfQBZBCUMHN9HTm5nFHYRBUz854pnXLu0b92c+AiAaee4De5RESfhKb2YTdBcs76u14FfiryH5k6GjSwwGgg=="}]},"_from":".","_npmVersion":"1.3.25","_npmUser":{"name":"mvila","email":"mvila@3base.com"},"maintainers":[{"name":"mvila","email":"mvila@3base.com"}]},"1.0.1":{"name":"co-priority-queue","version":"1.0.1","description":"A simple priority queue for co","author":{"name":"Manuel Vila","email":"mvila@3base.com"},"main":"index.js","repository":{"type":"git","url":"git://github.com/mvila/co-priority-queue"},"scripts":{"release":"(git checkout --quiet master && test -z \"$(git status --porcelain)\" && npm version $npm_config_release_type && git push --follow-tags) || echo \"An error occured (unclean repository?)\"","release-patch":"npm run release --release-type=patch","release-minor":"npm run release --release-type=minor","release-major":"npm run release --release-type=major","test":"echo \"Warning: no test specified\" && exit 0"},"license":"MIT","devDependencies":{"co":"~3.0.5"},"gitHead":"614e1f2e3458bbebb0c7e4ace35383c654a55329","bugs":{"url":"https://github.com/mvila/co-priority-queue/issues"},"homepage":"https://github.com/mvila/co-priority-queue","_id":"co-priority-queue@1.0.1","_shasum":"4467a78905d92785e7f05b710da47d55a7dab008","_from":".","_npmVersion":"2.0.0","_npmUser":{"name":"mvila","email":"mvila@3base.com"},"maintainers":[{"name":"mvila","email":"mvila@3base.com"}],"dist":{"shasum":"4467a78905d92785e7f05b710da47d55a7dab008","tarball":"https://registry.npmjs.org/co-priority-queue/-/co-priority-queue-1.0.1.tgz","integrity":"sha512-WOYAHH5iiut8n1g9nkErVyNd5FdgH7cHMGW9WhGaQK2mCAfeUhDmGzFHUVLTmo80rWWkqf2v0SiQb2bUyxDziw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEsqctleUA2Ij7DcDmbWX7tUMsXHT48zw1jObohdMNVEAiAvzPwi3wxzoP0GMLYhyMwGnXEiqFQeuNZc02H7vUTdUg=="}]}},"1.0.2":{"name":"co-priority-queue","version":"1.0.2","description":"A simple priority queue for co","author":{"name":"Manuel Vila","email":"mvila@3base.com"},"main":"index.js","repository":{"type":"git","url":"git://github.com/mvila/co-priority-queue"},"scripts":{"release":"(git checkout --quiet master && test -z \"$(git status --porcelain)\" && npm version $npm_config_release_type && git push --follow-tags) || echo \"An error occured (unclean repository?)\"","release-patch":"npm run release --release-type=patch","release-minor":"npm run release --release-type=minor","release-major":"npm run release --release-type=major","test":"echo \"Warning: no test specified\" && exit 0"},"license":"MIT","devDependencies":{"co":"^4.1.0"},"gitHead":"577f35729b0f7aec47df5cdfe3947639e051b7f1","bugs":{"url":"https://github.com/mvila/co-priority-queue/issues"},"homepage":"https://github.com/mvila/co-priority-queue","_id":"co-priority-queue@1.0.2","_shasum":"f39273de64e77da8b3823e944536a2b9d0563a4c","_from":".","_npmVersion":"2.0.0","_npmUser":{"name":"mvila","email":"mvila@3base.com"},"maintainers":[{"name":"mvila","email":"mvila@3base.com"}],"dist":{"shasum":"f39273de64e77da8b3823e944536a2b9d0563a4c","tarball":"https://registry.npmjs.org/co-priority-queue/-/co-priority-queue-1.0.2.tgz","integrity":"sha512-mdY+vVkQs8dcNoZWYGtLonz4MSpuGXYC0B6d06lZuUihQHuJxlnTLj2QrZS08dzv9G0mTZc3FlcjKo/Zm0k9pA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDrIDP1n0CcA+7xm191vg4ImhJSC1Z8fWYlD2foKW2OMQIhAID8mQwGz1qL0zIVJVlFSCJorAz2I1PZPBd5cSjRvP/c"}]}},"1.0.3":{"name":"co-priority-queue","version":"1.0.3","description":"A simple priority queue for co","author":{"name":"Manuel Vila","email":"mvila@3base.com"},"main":"index.js","repository":{"type":"git","url":"git://github.com/mvila/co-priority-queue"},"scripts":{"release":"(git checkout --quiet master && test -z \"$(git status --porcelain)\" && npm version $npm_config_release_type && git push --follow-tags) || echo \"An error occured (unclean repository?)\"","release-patch":"npm run release --release-type=patch","release-minor":"npm run release --release-type=minor","release-major":"npm run release --release-type=major","test":"echo \"Warning: no test specified\" && exit 0"},"license":"MIT","devDependencies":{"co":"^4.1.0"},"gitHead":"e161605030e4e0ac4b98ce7360910072c329e18f","bugs":{"url":"https://github.com/mvila/co-priority-queue/issues"},"homepage":"https://github.com/mvila/co-priority-queue","_id":"co-priority-queue@1.0.3","_shasum":"b9646e00e84439fb15563d61b68bee2ba5169b4f","_from":".","_npmVersion":"2.3.0","_nodeVersion":"0.11.16","_npmUser":{"name":"mvila","email":"mvila@3base.com"},"maintainers":[{"name":"mvila","email":"mvila@3base.com"}],"dist":{"shasum":"b9646e00e84439fb15563d61b68bee2ba5169b4f","tarball":"https://registry.npmjs.org/co-priority-queue/-/co-priority-queue-1.0.3.tgz","integrity":"sha512-1+rQyy27elT55XtI6aH3vLpC/b4FZn4dj1yz2RQRcGHbSJuN3eOrBVUAMmsEzrQFYtEiuiMRvsufg7mAC+X9lg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBUz19rX5Ob0O8yrRiHvGqT3O4govLdmB3c4nGpAxW23AiEAjkHr/nfeUIMWzgLnWxEz4PrvYsLpFTsh/lWiaX0uITU="}]}}},"readme":"# co-priority-queue [![Build Status](https://travis-ci.org/mvila/co-priority-queue.svg?branch=master)](https://travis-ci.org/mvila/co-priority-queue)\n\nA simple priority queue for co.\n\n## Installation\n\nIn your project folder, type:\n\n    npm install co-priority-queue\n\n## Example\n\nQueue with one consumer:\n\n    var co = require('co');\n    var Queue = require('co-priority-queue');\n\n    co(function *(){\n      var queue = new Queue;\n      queue.push('a', 1);\n      queue.push('b', 2);\n      queue.push('c', 2);\n      console.log(yield queue.next());\n      console.log(yield queue.next());\n      console.log(yield queue.next());\n    })();\n\nThe output is:\n\n    b\n    c\n    a\n\nQueue with multiple consumers:\n\n    var co = require('co');\n    var Queue = require('co-priority-queue');\n\n    co(function *(){\n      queue.push('a', 1);\n      queue.push('b', 2);\n      queue.push('c', 2);\n      var consumers = [queue.next(), queue.next(), queue.next()];\n      console.log(yield consumers);\n    })();\n\nThe output is:\n\n    ['b', 'c', 'a']\n\n## API\n\n### Queue()\n\nCreate a new priority queue.\n\n### Queue#push(data, priority)\n\nAdd `data` into the queue with the specified `priority`.\n\n### Queue#next()\n\nReturn the data with the highest priority. If the queue is empty, waits until a new data is added.\n\n## Credits\n\nAPI and implementation heavily inspired from [co-queue](https://github.com/segmentio/co-queue) created by Julian Gruber. Thanks to him.\n\n## License\n\nco-priority-queue is distributed under the MIT license.\n","maintainers":[{"name":"mvila","email":"mvila@3base.com"}],"time":{"modified":"2022-06-13T06:23:24.427Z","created":"2014-03-22T09:21:12.848Z","1.0.0":"2014-03-22T09:21:12.848Z","1.0.1":"2015-01-02T00:31:44.279Z","1.0.2":"2015-01-07T10:23:44.618Z","1.0.3":"2015-03-14T02:09:45.038Z"},"homepage":"https://github.com/mvila/co-priority-queue","repository":{"type":"git","url":"git://github.com/mvila/co-priority-queue"},"author":{"name":"Manuel Vila","email":"mvila@3base.com"},"bugs":{"url":"https://github.com/mvila/co-priority-queue/issues"},"license":"MIT","readmeFilename":"README.md"}