{"name":"it-merge","version":"1.0.0","description":"Treat one or more iterables as a single iterable","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 dist","check":"tsc --noEmit","build":"npm run build:types","build:types":"tsc --emitDeclarationOnly --declarationDir dist","prepublishOnly":"npm run build"},"author":{"name":"Alex Potsides","email":"alex@achingbrain.net"},"license":"ISC","dependencies":{"it-pushable":"^1.4.0"},"devDependencies":{"ava":"^3.12.1","it-all":"^1.0.4","nyc":"^15.1.0","standard":"^14.3.1","typescript":"^4.0.2"},"typesVersions":{"*":{"*":[".","dist/*"]}},"gitHead":"594c9c2e12486a0eed771330b4630681608afd9e","_id":"it-merge@1.0.0","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.22.1/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-bs40LMjG/9JMOcJ7pgyGLoOeWBpw28ZoMmZIk/1NCa5SUxd4elXCuadAr2qSjPiHz2GxrqoWGFAP7SePGddatw==","shasum":"b12310933ee79381eca2288245572a4f8d252030","tarball":"http://registry-npm.ywwl.com/it-merge/download/it-merge-1.0.0.tgz","fileCount":7,"unpackedSize":3770,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgCHXACRA9TVsSAnZWagAAC04P/Ah3vDfysUzhzVjo3kBj\nwZ4ijiRkno7Ex00iSZCzwvH0giEiij5lO4XiamKdkfWxXhL0oX6OdBuJo+S8\nOgaMwjga/ewbLg3oLRMxmIKqSiX6y9iykj/Cnd3bB/iBtbkSydoGUmJTxTky\n6jXul2BL8Shks65cRVXb8MEUvZxL5WZP9vp9uPlNNlWv4o21YbbF9ajaGdNF\n1yuogDDSjdzuS3BhKF0wjysBlugzLfG30qrBQ8ou9Oe2sMofyUKDubecl74A\n9KAHH+k2xRAu9ji7GAWSf+MsU9Jhd9I/31VoCkhAKK6xtjbXJelOQvJHshEr\nfIqqXDEmDQqr+OykGLAq9i0iCMbJxkoqWK2FqQ84Wzv7ox3c23HB1HiidCJB\n44TyOBsA5dVNSkMgQ/nXwx+I4RKescyyH1XnK2kPBhOTtCkrWhz9ZzYt1gs6\nf5hXYr5+1BK7zoBOUfVH9KufscX5AOh8M5SJBrI3KsHEvTdmajsWCeARlVKp\nytsG+yQGaQ3ydPitXLkjBRTMO7I6nE/S4mzB+u+BZulFJHGcvUqV/l0M110c\neKeEd4xzC55Mt1TE6pWh1E2H1vg0NN7od/3yh2E1CJsKkwwyryD8ko6mm5sf\nULS25NI6o07TZKtZkjkZhgHryWf9r4wtcnr64h0tiALORJqGLjMSwI6he38t\nd/kc\r\n=2eME\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFpNA/i6dGl3atfikDbc3g6Ta2X0ISwwvGsR/kegQmjdAiAsCBgtWAeVhn8iDjwcK0iu/D7LqmR1kkQfecKwO4CpXQ=="}],"size":1783,"noattachment":false,"key":"/it-merge/-/it-merge-1.0.0.tgz"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/it-merge_1.0.0_1611167168108_0.7775986880508341"},"_hasShrinkwrap":false,"readme":"# it-merge\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> Treat one or more iterables as a single iterable\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\nMerge several (async)iterables into one, yield values as they arrive.\n\nNb. sources are iterated over in parallel so the order of emitted items is not guaranteed.\n\n## Example\n\n```javascript\nimport merge from 'it-merge'\nimport all from 'it-all'\n\n// This can also be an iterator, generator, etc\nconst values1 = [0, 1, 2, 3, 4]\nconst values2 = [5, 6, 7, 8, 9]\n\nconst arr = all(merge(values1, values2))\n\nconsole.info(arr) // 0, 1, 2, 3, 4, 5, 6, 7, 8, 9\n```\n\nAsync sources must be awaited:\n\n```javascript\nimport merge from 'it-merge'\nimport all from 'it-all'\n\n// This can also be an iterator, async iterator, generator, etc\nconst values1 = async function * () {\n  yield * [0, 1, 2, 3, 4]\n}\nconst values2 = async function * () {\n  yield * [5, 6, 7, 8, 9]\n}\n\nconst arr = await all(merge(values1(), values2()))\n\nconsole.info(arr) // 0, 1, 5, 6, 2, 3, 4, 7, 8, 9  <- nb. order is not guaranteed\n```\n\n# Install\n\n```console\n$ npm i it-merge\n```\n\n## Browser `<script>` tag\n\nLoading this module through a script tag will make it's exports available as `ItMerge` in the global namespace.\n\n```html\n<script src=\"https://unpkg.com/it-merge/dist/index.min.js\"></script>\n```\n\n# API Docs\n\n- <https://achingbrain.github.io/it/modules/it_merge.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-merge/LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)\n- MIT ([LICENSE-MIT](https://github.com/achingbrain/it/blob/main/packages/it-merge/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":1611167168220,"_cnpm_publish_time":1611167168220,"dist-tags":{"latest":"3.0.15"}}