{"name":"it-parallel-batch","version":"0.0.1","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","scripts":{"test":"nyc --check-coverage --lines 100 --reporter html --reporter lcov ava","lint":"standard","coveralls":"npm test && cat ./coverage/lcov.info | coveralls"},"author":{"name":"Alex Potsides","email":"alex@achingbrain.net"},"license":"ISC","repository":{"type":"git","url":"git+https://github.com/achingbrain/it-parallel-batch.git"},"bugs":{"url":"https://github.com/achingbrain/it-parallel-batch/issues"},"homepage":"https://github.com/achingbrain/it-parallel-batch#readme","devDependencies":{"ava":"^2.4.0","coveralls":"^3.0.2","delay":"^4.3.0","it-all":"1.0.0","nyc":"^14.0.0","standard":"^14.3.1"},"dependencies":{"it-batch":"0.0.1"},"gitHead":"bb48f16bf86bf7d71d7b655a868877a9ae4d2299","_id":"it-parallel-batch@0.0.1","_nodeVersion":"12.13.0","_npmVersion":"6.12.0","dist":{"integrity":"sha512-VH6mDXl44FtmAr8kruSIXfHqmFPHsatoDtDGlknk32D747dn3s4szZI5Q38WovFJduxDHaX+EwCayOwOe4EMJQ==","shasum":"f2cdadd06fd6842c037f73baa1d4c65d75663861","tarball":"http://registry-npm.ywwl.com/it-parallel-batch/download/it-parallel-batch-0.0.1.tgz","fileCount":4,"unpackedSize":2933,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd28ZHCRA9TVsSAnZWagAATzkQAJcyaQbIu+03kSK4yQVl\nB2fqm2ABa1WHQSnpBJxM+cUahn1H0L12wDXS2CiFKyCiOFRIpVQJ28mHpnro\nMObTMOC8Daj4ODEEfIxlwRjeu7M1qU5CkTwy1ctCPuqgxZ69DzI+yevqiUnm\ndP3s6fXSTWpYLVME5moNnEeauhKHmdw1ls/9mqjZLFaPxAebrKyUwGMpSoer\naVOGwuDz25Yv/KuVxhYqQUMtBFPb/lwSKTBq/IBbQ3tj7zYAUjpfLi8N3ceW\nnlEGVlpYCOsBgRYdEFFlK7xvqMr/ebpdKIFwuuvK1cN454u5czuiAy9gpX1l\n6ZNE5tbzoY/2whODEW8kx8GqqhOGOJ8GarYXHLpTyr5AmeZZbEDEYVf+Uzoy\npdnMu6/3gV82YRChula1W2aUV0dYzYJ9LJId1QjTz47tj135VqNM6y61SvFm\nGsZFMeRNFB1np7xM/6w46kfXspwr8s2yBc1a3ED6USOFef46VgiQyEFX6BG6\npu848trmQ4O7Gxx6u8gGB+x/O/wkmbyU4Mv7QdVjKncFHr4tuUDcN7o4zv1u\nBdB7RTc6W+LhA4df+AxWNxlJE1QhWIoSfMbdQ4QLZC05s1xR71jBn2Ilz3+m\nqknOuoebT/Q5LXFD0KlhJZqJi0hSPQpz0FJxh5Aaqv9kFP/44B3ACKlmZ5Uu\n7132\r\n=9oKO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBlOmaIm3T2LkGcEJZPm96/hQ6p/g/aX7xuZNv3UKqOjAiAOe/YYzQ0rPnMy3RLq97LTTdnut8tnLpxkuVxCLijN0A=="}],"size":1253,"noattachment":false,"key":"/it-parallel-batch/-/it-parallel-batch-0.0.1.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_0.0.1_1574684230946_0.011649494806802219"},"_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":1574684231142,"_cnpm_publish_time":1574684231142,"dist-tags":{"latest":"3.0.11"}}