{"name":"batch","version":"0.5.2","licenses":[{"type":"MIT"}],"description":"Simple async batch","author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca"},"devDependencies":{"mocha":"*","should":"*"},"main":"index","browser":{"emitter":"component-emitter"},"repository":{"type":"git","url":"https://github.com/visionmedia/batch.git"},"gitHead":"cd69ea173754c0fbd3a7ab33e0a678e6909f3bf3","bugs":{"url":"https://github.com/visionmedia/batch/issues"},"homepage":"https://github.com/visionmedia/batch","_id":"batch@0.5.2","scripts":{},"_shasum":"546543dbe32118c83c7c7ca33a1f5c5d5ea963e9","_from":".","_npmVersion":"2.1.14","_nodeVersion":"0.11.14","_npmUser":{"name":"tjholowaychuk","email":"tj@vision-media.ca"},"maintainers":[{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"dist":{"shasum":"546543dbe32118c83c7c7ca33a1f5c5d5ea963e9","tarball":"http://registry-npm.ywwl.com/batch/download/batch-0.5.2.tgz","integrity":"sha512-X0I0DXa+bcVkCRdJv2tUBIYLl+tCE/2e/sE2NHpNneZT49sa0JUJjMevlbKJRajngUOk0MamQvetRDyTkzKqnA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC6VhsLpP9pAz5LnBXNCOKUwCal8eswfTf+R9Xa9umdUAIhAMBZOC6YJkH0yXkVjATQnwcaeie9LkOaTBYJ64N88Qz8"}],"size":3097,"noattachment":false,"key":"/batch/-/batch-0.5.2.tgz"},"directories":{},"readme":"\n# batch\n\n  Simple async batch with concurrency control and progress reporting.\n\n## Installation\n\n```\n$ npm install batch\n```\n\n## API\n\n```js\nvar Batch = require('batch')\n  , batch = new Batch;\n\nbatch.concurrency(4);\n\nids.forEach(function(id){\n  batch.push(function(done){\n    User.get(id, done);\n  });\n});\n\nbatch.on('progress', function(e){\n\n});\n\nbatch.end(function(err, users){\n\n});\n```\n\n### Progress events\n\n  Contain the \"job\" index, response value, duration information, and completion data.\n\n```\n{ index: 1,\n  value: 'bar',\n  pending: 2,\n  total: 3,\n  complete: 2,\n  percent: 66,\n  start: Thu Oct 04 2012 12:25:53 GMT-0700 (PDT),\n  end: Thu Oct 04 2012 12:25:53 GMT-0700 (PDT),\n  duration: 0 }\n```\n\n## License\n\n[MIT](LICENSE)\n","publish_time":1419272972048,"_cnpm_publish_time":1419272972048,"dist-tags":{"latest":"0.6.1"}}