{"name":"batch","description":"Simple async batch with concurrency control and progress reporting.","version":"0.6.0","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":"09ca0c57db6c02801eda147830f04747eeef9f4f","bugs":{"url":"https://github.com/visionmedia/batch/issues"},"homepage":"https://github.com/visionmedia/batch#readme","_id":"batch@0.6.0","scripts":{},"_shasum":"cd6a5e555f53ae92b561899b2738089b0dd91b31","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.7.3","_npmUser":{"name":"dougwilson","email":"doug@somethingdoug.com"},"dist":{"shasum":"cd6a5e555f53ae92b561899b2738089b0dd91b31","tarball":"http://registry-npm.ywwl.com/batch/download/batch-0.6.0.tgz","integrity":"sha512-49Ahre07rxfR7ngbgPqGWyesc9iJmmbWTLUpb34jy8WgwwaZfBP01C1oSktsQQcryctdxteWxwCTDfmE4CgZqw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGue6Ndvvv65fofqA+kFS44Ko5LiWwcPP+rRfgcSRrdhAiEArnZaf43qL6sajBnGEz9vbseLaSDNg/+9s62MDRG7BvQ="}],"size":3354,"noattachment":false,"key":"/batch/-/batch-0.6.0.tgz"},"maintainers":[{"name":"dougwilson","email":"doug@somethingdoug.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/batch-0.6.0.tgz_1490493912235_0.23688052222132683"},"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":1490493913916,"_cnpm_publish_time":1490493913916,"dist-tags":{"latest":"0.6.1"}}