{"name":"batch","description":"Simple async batch with concurrency control and progress reporting.","version":"0.6.1","author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca"},"license":"MIT","devDependencies":{"mocha":"*","should":"*"},"main":"index","browser":{"emitter":"events"},"repository":{"type":"git","url":"git+https://github.com/visionmedia/batch.git"},"gitHead":"577ea162b9be76e79d2fcc43c47ed573112e9892","bugs":{"url":"https://github.com/visionmedia/batch/issues"},"homepage":"https://github.com/visionmedia/batch#readme","_id":"batch@0.6.1","scripts":{},"_shasum":"dc34314f4e679318093fc760272525f94bf25c16","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.3","_npmUser":{"name":"dougwilson","email":"doug@somethingdoug.com"},"dist":{"shasum":"dc34314f4e679318093fc760272525f94bf25c16","tarball":"http://registry-npm.ywwl.com/batch/download/batch-0.6.1.tgz","integrity":"sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCgejhpR/4IO5kct67X9DFmgMbCwtpyie1IPDTn4d5TjgIgfhMR0wLUgRqjd1CVFPQcxlguVEBbdbYmSuZiF9hkmio="}],"size":3384,"noattachment":false,"key":"/batch/-/batch-0.6.1.tgz"},"maintainers":[{"name":"dougwilson","email":"doug@somethingdoug.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/batch-0.6.1.tgz_1494969108544_0.02703835256397724"},"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":1494969109205,"_cnpm_publish_time":1494969109205,"dist-tags":{"latest":"0.6.1"}}