{"name":"it-parallel-batch","version":"1.0.4","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.2","nyc":"^14.0.0","standard":"^14.3.1"},"dependencies":{"it-batch":"^1.0.4"},"gitHead":"faf5c823bffd25e888b9c0353aed30efa5cf508d","_id":"it-parallel-batch@1.0.4","_nodeVersion":"13.13.0","_npmVersion":"lerna/3.19.0/node@v13.13.0+x64 (darwin)","dist":{"integrity":"sha512-YyIa0urQO7C/YmWaKAXILv7glvvsfM9jsL+u1CUQxyO8vslLyv9i3LT8AFC55Y9r6xT3A4jK9FhaXND2NmcPFw==","shasum":"1bb93b5564d7d87149abf707ee3f860c7b44aae2","tarball":"http://registry-npm.ywwl.com/it-parallel-batch/download/it-parallel-batch-1.0.4.tgz","fileCount":4,"unpackedSize":6413,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJepqc9CRA9TVsSAnZWagAA/xMP/jsWIEnJEtRd/fjncrun\nfmGWpN/bgZRlxdPuYhiP3odtIdrsAF8Mo3SvhSHMpBCLPUuBHsD+oOcVKQzt\nEgXGwlhgXZAZ1apCWyp9Wb2k/Fh4jghSR74UKd2nINKL/J3ALEk88NyryPtP\n/0X6Mx4LfIa44wV7Z6bJvJBRbYr48720DkbCKTCyZc2k5R22R1eW0ghxMNai\n06MsGN/8mGQyswCAaudkIik4CxbUf+8ogRVV+zbwv9TLm0+U9wJLPfPTDrF2\nSqo8eUpsNHFA5xoQb2TUhYmv1Ynu8jk2JbNNs+TCluS3isa4nMfnE28T9/lg\nJpzKE2OGCDFv8Q2kxf32degLMc+jc87LPUgaCCuoMHHfPb03db30UQ7uVTv3\nCBlps1Znjy6bcJ4cw7Z/xYCjPg0Qys+41yZ5+vjYqWgIVV2Ld1Ck4NBkRU5/\ng9ndCQyXNmeWGfb1ThP4C/Zj1rmi2J7FFrXdHVKzY0r8/pfkVLWcACwvY1Be\njjjErZ15dNNV0V71zd+mj7pfmvMgyb0yrgl65z4nKd0+0WKh2q0uv/Xg/uuG\nbtH23+iiWmlfX1GldvCOTgRklmfeEHMdq1+S8iJ78hFKILsK2ebwHWNuImuN\nnxOjrCJ0MJ4hCfNzNYvI/rhl9eM+g0XVJo1sMyi4ZVbOaD/Jdl/GcaM6UNDz\ng8gB\r\n=we2I\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCZA2lJfHTLNurBRDzdmbdUJnbFRamhMhac2gzdUVh9YwIgN/tjcSVKXowo9DMjp9Q0BetEMYK2I7rwSo9tXKNU/qg="}],"size":1754,"noattachment":false,"key":"/it-parallel-batch/-/it-parallel-batch-1.0.4.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.4_1587980093093_0.16675325599917867"},"_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":1587980093239,"_cnpm_publish_time":1587980093239,"dist-tags":{"latest":"3.0.11"}}