{"name":"it-parallel-batch","version":"1.0.2","description":"Takes an async iterator that emits promise-returning functions, invokes them in parallel and emits the results in the same order as the input","main":"index.js","repository":{"type":"git","url":"git+https://github.com/achingbrain/it.git"},"homepage":"https://github.com/achingbrain/it#readme","bugs":{"url":"https://github.com/achingbrain/it/issues"},"scripts":{"test":"ava","lint":"standard","coverage":"nyc --reporter html --reporter lcov ava","clean":"rm -rf .nyc_output coverage"},"author":{"name":"Alex Potsides","email":"alex@achingbrain.net"},"license":"ISC","devDependencies":{"ava":"^2.4.0","delay":"^4.3.0","it-all":"^1.0.1","nyc":"^14.0.0","standard":"^14.3.1"},"dependencies":{"it-batch":"0.0.1"},"gitHead":"92319e3234c9361cee162c3e4ff5648770028f2a","_id":"it-parallel-batch@1.0.2","_nodeVersion":"12.13.0","_npmVersion":"lerna/3.19.0/node@v12.13.0+x64 (darwin)","dist":{"integrity":"sha512-r9pUUAxHXl0j2slbelKmugAqtQ7IL5gTNugsR9NCWdpHCcjmXOj2CrEP4EVnz4f/fTHLIUAYyiEFHDoxwwHF/g==","shasum":"2ec5ebbf7cb0ff7ec8ae712dac7c8859c1483fc7","tarball":"http://registry-npm.ywwl.com/it-parallel-batch/download/it-parallel-batch-1.0.2.tgz","fileCount":26,"unpackedSize":104788,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3XAECRA9TVsSAnZWagAA5cwP/2ppMC2tI8wT5R/7EvoG\nL8xrvZdj6PNlWER0+qAhSwjihFzWbDGBRsLr4Yds+oW+wJIc2bMj6Y9JjyRE\nWUa0JAirrk341QXE+DCnXPogObhpjHizOh2xn/7Y9fKoNvxheJqfCqqM1shK\np5EX0xFP+OZssbPb7WCy5ntuuFj8+glsPe+lQJZxi/3QsTR/CkdzK9oyCZNP\nNxzKRZfe4cSZbW1BnwCGqD/A2LZ5frr32OTJ0483EHOf+R8mIgZdQZ0Z1bKf\nAnMAZmuvj08F8Di+zf5urof8CR5GgzqXGtVLXac2Hxv5mJWdtDB3W2/lj0cx\nXAA6VBE+a2a2G/FQs67Al9tnNHqyyEmiyLbEbayvHQZBOroZxtlDT7i2lhJ9\nAu2MyWr73R412F8cxL/tLjFftqNjaHRxl85R6JKu8HIFH83xS5wlgj3h1rO8\nbny1lTjsVi7mtP6l1GlU1y19ADWHPOK0WGUbtsP/TerSBBGxq0OU8pEL6TJ0\nExNJJRtH/Admn6xdNLmm6ogY+q1st0p3nrmI7DBpTh7bX88ocKs2j/a54cAa\nojOBrJHuGXdti23/IIp34ultt647zyuNq+SP/H8F45MmwUKrkZba0DFzpcjg\nbIn7jvPFQrJdOSG/j20rSWMCewHsu6KrIUzbJq+904Wj7s3E314clnJ64CRd\n47VV\r\n=DB1S\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDl2JG0c/Mrr5MvfySmj/o2EbSczsRqHOiIftzGaJNVIQIhAO2eKNoy8fQHZ9G1yNTYV2fFv9LPWJoc2nbPscXJiQjj"}],"size":18211,"noattachment":false,"key":"/it-parallel-batch/-/it-parallel-batch-1.0.2.tgz"},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}],"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/it-parallel-batch_1.0.2_1574793219985_0.31093117027939443"},"_hasShrinkwrap":false,"readme":"# it-parallel-batch\n\n[![codecov](https://img.shields.io/codecov/c/github/achingbrain/it.svg?style=flat-square)](https://codecov.io/gh/achingbrain/it)\n[![CI](https://img.shields.io/github/actions/workflow/status/achingbrain/it/js-test-and-release.yml?branch=main\\&style=flat-square)](https://github.com/achingbrain/it/actions/workflows/js-test-and-release.yml?query=branch%3Amain)\n\n> Process (async)iterable values as functions with concurrency control\n\n# About\n\n<!--\n\n!IMPORTANT!\n\nEverything in this README between \"# About\" and \"# Install\" is automatically\ngenerated and will be overwritten the next time the doc generator is run.\n\nTo make changes to this section, please update the @packageDocumentation section\nof src/index.js or src/index.ts\n\nTo experiment with formatting, please run \"npm run docs\" from the root of this\nrepo and examine the changes made.\n\n-->\n\nTakes an async iterator that emits promise-returning functions, invokes them in parallel and emits the results in the same order as the input.\n\nThe final batch may be smaller than the batch size.\n\n## Example\n\n```javascript\nimport parallelBatch from 'it-parallel-batch'\nimport all from 'it-all'\nimport delay from 'delay'\n\n// This can also be an iterator, async iterator, generator, etc\nconst input = [\n  async () => {\n    await delay(500)\n\n    return 1\n  },\n  async () => {\n    await delay(200)\n\n    return 2\n  },\n  async () => {\n    await delay(100)\n\n    return 3\n  }\n]\n\nconst batchSize = 2\n\nconst result = await all(parallelBatch(input, batchSize))\n\nconsole.info(result) // [1, 2, 3]\n```\n\n# Install\n\n```console\n$ npm i it-parallel-batch\n```\n\n## Browser `<script>` tag\n\nLoading this module through a script tag will make it's exports available as `ItParallelBatch` in the global namespace.\n\n```html\n<script src=\"https://unpkg.com/it-parallel-batch/dist/index.min.js\"></script>\n```\n\n# API Docs\n\n- <https://achingbrain.github.io/it/modules/it_parallel_batch.html>\n\n# License\n\nLicensed under either of\n\n- Apache 2.0, ([LICENSE-APACHE](https://github.com/achingbrain/it/blob/main/packages/it-parallel-batch/LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)\n- MIT ([LICENSE-MIT](https://github.com/achingbrain/it/blob/main/packages/it-parallel-batch/LICENSE-MIT) / <http://opensource.org/licenses/MIT>)\n\n# Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n","publish_time":1574793220166,"_cnpm_publish_time":1574793220166,"dist-tags":{"latest":"3.0.11"}}