{"_id":"enqueue","_rev":"137279","name":"enqueue","description":"queue up function calls","dist-tags":{"latest":"1.0.2"},"maintainers":[{"name":"mattmueller","email":"mattmuelle@gmail.com"}],"time":{"modified":"2021-06-03T11:22:24.000Z","created":"2014-08-01T07:27:34.952Z","1.0.2":"2015-03-19T22:03:11.046Z","1.0.1":"2015-03-19T20:01:27.218Z","1.0.0":"2015-03-19T08:24:55.281Z","0.0.4":"2014-09-01T04:22:07.161Z","0.0.3":"2014-08-03T03:41:16.515Z","0.0.2":"2014-08-01T23:43:03.848Z","0.0.1":"2014-08-01T07:27:34.952Z"},"users":{"antixrist":true,"quocnguyen":true},"author":{"name":"Matthew Mueller","email":"mattmuelle@gmail.com"},"repository":{"type":"git","url":"git://github.com/MatthewMueller/enqueue.git"},"versions":{"1.0.2":{"name":"enqueue","version":"1.0.2","description":"queue up function calls","keywords":["queue","simple","tiny","timeout","concurrency"],"author":{"name":"Matthew Mueller","email":"mattmuelle@gmail.com"},"repository":{"type":"git","url":"git://github.com/MatthewMueller/enqueue.git"},"dependencies":{"sliced":"0.0.5"},"devDependencies":{"mocha":"*","superagent":"^1.1.0"},"main":"index","gitHead":"acc53e451070bc7cd2573b15dead1346589102f5","bugs":{"url":"https://github.com/MatthewMueller/enqueue/issues"},"homepage":"https://github.com/MatthewMueller/enqueue","_id":"enqueue@1.0.2","scripts":{},"_shasum":"9014e9bce570ee93ca96e6c8e63ad54c192b6bc8","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"mattmueller","email":"mattmuelle@gmail.com"},"maintainers":[{"name":"mattmueller","email":"mattmuelle@gmail.com"}],"dist":{"shasum":"9014e9bce570ee93ca96e6c8e63ad54c192b6bc8","size":12405,"noattachment":false,"key":"/enqueue/-/enqueue-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/enqueue/download/enqueue-1.0.2.tgz"},"directories":{},"publish_time":1426802591046,"_cnpm_publish_time":1426802591046,"_hasShrinkwrap":false},"1.0.1":{"name":"enqueue","version":"1.0.1","description":"queue up function calls","keywords":["queue","simple","tiny","timeout","concurrency"],"author":{"name":"Matthew Mueller","email":"mattmuelle@gmail.com"},"repository":{"type":"git","url":"git://github.com/MatthewMueller/enqueue.git"},"dependencies":{"sliced":"0.0.5"},"devDependencies":{"mocha":"*","superagent":"^1.1.0"},"main":"index","gitHead":"df4bd2125ee304225da0c2b51643bb9f0359605f","bugs":{"url":"https://github.com/MatthewMueller/enqueue/issues"},"homepage":"https://github.com/MatthewMueller/enqueue","_id":"enqueue@1.0.1","scripts":{},"_shasum":"9bebe8c76323a5a698a00192c008be40c31d52fb","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"mattmueller","email":"mattmuelle@gmail.com"},"maintainers":[{"name":"mattmueller","email":"mattmuelle@gmail.com"}],"dist":{"shasum":"9bebe8c76323a5a698a00192c008be40c31d52fb","size":12326,"noattachment":false,"key":"/enqueue/-/enqueue-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/enqueue/download/enqueue-1.0.1.tgz"},"directories":{},"publish_time":1426795287218,"_cnpm_publish_time":1426795287218,"_hasShrinkwrap":false},"1.0.0":{"name":"enqueue","version":"1.0.0","description":"queue up function calls","keywords":[],"author":{"name":"Matthew Mueller","email":"mattmuelle@gmail.com"},"repository":{"type":"git","url":"git://github.com/MatthewMueller/enqueue.git"},"dependencies":{"sliced":"0.0.5"},"devDependencies":{"mocha":"*"},"main":"index","gitHead":"54add1e81a46ff2e65cc0ec9d7d7bf7dbd25b359","bugs":{"url":"https://github.com/MatthewMueller/enqueue/issues"},"homepage":"https://github.com/MatthewMueller/enqueue","_id":"enqueue@1.0.0","scripts":{},"_shasum":"95cf454776af7ff6f49770be345735e053418fae","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"mattmueller","email":"mattmuelle@gmail.com"},"maintainers":[{"name":"mattmueller","email":"mattmuelle@gmail.com"}],"dist":{"shasum":"95cf454776af7ff6f49770be345735e053418fae","size":11971,"noattachment":false,"key":"/enqueue/-/enqueue-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/enqueue/download/enqueue-1.0.0.tgz"},"directories":{},"publish_time":1426753495281,"_cnpm_publish_time":1426753495281,"_hasShrinkwrap":false},"0.0.4":{"name":"enqueue","version":"0.0.4","description":"queue up function calls","keywords":[],"author":{"name":"Matthew Mueller","email":"mattmuelle@gmail.com"},"repository":{"type":"git","url":"git://github.com/MatthewMueller/enqueue.git"},"dependencies":{},"devDependencies":{"mocha":"*"},"main":"index","bugs":{"url":"https://github.com/MatthewMueller/enqueue/issues"},"homepage":"https://github.com/MatthewMueller/enqueue","_id":"enqueue@0.0.4","_shasum":"569cb8ff337f35cba3ddfb15d52812fbff851167","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"mattmueller","email":"mattmuelle@gmail.com"},"maintainers":[{"name":"mattmueller","email":"mattmuelle@gmail.com"}],"dist":{"shasum":"569cb8ff337f35cba3ddfb15d52812fbff851167","size":10442,"noattachment":false,"key":"/enqueue/-/enqueue-0.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/enqueue/download/enqueue-0.0.4.tgz"},"directories":{},"publish_time":1409545327161,"_cnpm_publish_time":1409545327161,"_hasShrinkwrap":false},"0.0.3":{"name":"enqueue","version":"0.0.3","description":"queue up function calls","keywords":[],"author":{"name":"Matthew Mueller","email":"mattmuelle@gmail.com"},"repository":{"type":"git","url":"git://github.com/MatthewMueller/enqueue.git"},"dependencies":{},"devDependencies":{"mocha":"*"},"main":"index","bugs":{"url":"https://github.com/MatthewMueller/enqueue/issues"},"homepage":"https://github.com/MatthewMueller/enqueue","_id":"enqueue@0.0.3","_shasum":"101994caefb82f2e9dbfb325f233ed58262b1825","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"mattmueller","email":"mattmuelle@gmail.com"},"maintainers":[{"name":"mattmueller","email":"mattmuelle@gmail.com"}],"dist":{"shasum":"101994caefb82f2e9dbfb325f233ed58262b1825","size":2011,"noattachment":false,"key":"/enqueue/-/enqueue-0.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/enqueue/download/enqueue-0.0.3.tgz"},"directories":{},"publish_time":1407037276515,"_cnpm_publish_time":1407037276515,"_hasShrinkwrap":false},"0.0.2":{"name":"enqueue","version":"0.0.2","description":"queue up function calls","keywords":[],"author":{"name":"Matthew Mueller","email":"mattmuelle@gmail.com"},"repository":{"type":"git","url":"git://github.com/MatthewMueller/enqueue.git"},"dependencies":{},"devDependencies":{"mocha":"*"},"main":"index","bugs":{"url":"https://github.com/MatthewMueller/enqueue/issues"},"homepage":"https://github.com/MatthewMueller/enqueue","_id":"enqueue@0.0.2","dist":{"shasum":"f999526c1ad65fec6a4754f6f9b68d423f8a6a7d","size":1941,"noattachment":false,"key":"/enqueue/-/enqueue-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/enqueue/download/enqueue-0.0.2.tgz"},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"mattmueller","email":"mattmuelle@gmail.com"},"maintainers":[{"name":"mattmueller","email":"mattmuelle@gmail.com"}],"directories":{},"publish_time":1406936583848,"_cnpm_publish_time":1406936583848,"_hasShrinkwrap":false},"0.0.1":{"name":"enqueue","version":"0.0.1","description":"queue up function calls","keywords":[],"author":{"name":"Matthew Mueller","email":"mattmuelle@gmail.com"},"repository":{"type":"git","url":"git://github.com/MatthewMueller/enqueue.git"},"dependencies":{},"devDependencies":{"mocha":"*","should":"*"},"main":"index","bugs":{"url":"https://github.com/MatthewMueller/enqueue/issues"},"homepage":"https://github.com/MatthewMueller/enqueue","_id":"enqueue@0.0.1","_shasum":"bb022404956eff73eb01eaf914fd490e84a6103c","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"mattmueller","email":"mattmuelle@gmail.com"},"maintainers":[{"name":"mattmueller","email":"mattmuelle@gmail.com"}],"dist":{"shasum":"bb022404956eff73eb01eaf914fd490e84a6103c","size":1314,"noattachment":false,"key":"/enqueue/-/enqueue-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/enqueue/download/enqueue-0.0.1.tgz"},"directories":{},"publish_time":1406878054952,"_cnpm_publish_time":1406878054952,"_hasShrinkwrap":false}},"readme":"\n# enqueue\n\n  seamlessly queue up asynchronous function calls. supports concurrency and timeouts.\n\n## Installation\n\nNode:\n\n```bash\n$ npm install enqueue\n```\n\nBrowser (with [Duo](https://github.com/duojs/duo)):\n\n```js\nvar enqueue = require('matthewmueller/enqueue');\n```\n\n## Example\n\n```js\nvar superagent = require('superagent');\nvar enqueue = require('enqueue');\n\n// execute 2 at a time, with a timeout\nvar options = {\n  concurrency: 2,\n  timeout: 1000,\n  limit: 10\n};\n\nvar fn = enqueue(function(url, done) {\n  superagent.get(url, done);\n}, options);\n\nfn('http://lapwinglabs.com', function(err, res) { /* ... */ })\nfn('http://gittask.com', function(err, res) { /* ... */ })\n\n// delayed until one of the other two come back\nfn('http://mat.io', function(err, res) { /* ... */ })\n```\n\n## API\n\n### `queue = enqueue(fn, [options])`\n\nCreate a queue wrapper for `fn`. `options` include:\n\n- `concurrency` (default: `1`): specify how many jobs you'd like to run at once.\n- `timeout` (default: `false`): specify how long a job stall run before it times out.\n- `limit` (default: `Infinity`): limit how many jobs can be queued up at any given time.\n`queue` will return an `Error` if the limit has been reached.\n\n### `queue(args..., [end])`\n\nPass any number of `args...` into the queue with an optional `end` function.\n\n## Test\n\n```\nnpm install\nmake test\n```\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2014 Matthew Mueller &lt;mattmuelle@gmail.com&gt;\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","_attachments":{},"homepage":"https://github.com/MatthewMueller/enqueue","bugs":{"url":"https://github.com/MatthewMueller/enqueue/issues"}}