{"name":"it-merge","version":"0.0.1","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":"fc7002104b7e8c209bac9f81d396bb9a7e134c16","_id":"it-merge@0.0.1","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.22.1/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-CEVBE94UKCXFhfH2MyrQdIDwRscv4I9k6k2IgBQad7YU9yHbA4rNF3AOhZwRzGNnDM5HaShQCkHW5B2QYRfjew==","shasum":"3df22add7ca8a66d013c0500d2adf2530db4b792","tarball":"http://registry-npm.ywwl.com/it-merge/download/it-merge-0.0.1.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\nwsFcBAEBCAAQBQJgCGGTCRA9TVsSAnZWagAA5KwP/0qHxqclxvd87qM7+0xw\ntnVyalKjfWDBVrCwtPzziF/a7BRXeK1LuuNKL7VmVy4FNIxA98KglW1Ehlf/\nqE3EJsbw56SdqFVVxhikpEnUpuSttPcG2yFygK6AZOvuqz0UB1qDycA6dSje\nkRHVTZzTAQ5ifGzxGVo+yPaiStTFbpuBRjXrkrKIPElFH0ZqXRu6u7Mp4OG2\n81OlUXCF9QLBg/LhNQ+90EIuSSijW8Z/w8WAVI1zAKd7bEnaiP/367fg3MPm\naaqEMgR9Jrl0WRCUdBrTyf2Pl1bpH+K4KamDKqnCmbK4tYFVZ0C3P/mmoBD+\nGw08YLooZotSLMX+P2w3ruUKMlFtl88QJqL6OHCax12//pvnA0soT+1nQ/sv\nCToQUuui/F62ZDRh6Dfaf3f0QNpTEPOeECKABltAy7aOC1sfHJRqC9O/pszo\nAE2M2i57A3V7J/cZ5ikwS+oBByJflIhDBm+wbBDTqfTOAgB4fu0AXZf+z672\n+W4hHkfQDus0BbW2qHPU2EPoopJYSeL7IKv0tRAG6GLxzejY8LaW1vR9ejls\nviPet54ZABlnLBkIZN2SJk/kvw/qESLHLAJZP6hkwTU3qsWjIOiq8dpf1R7R\n0yE0qOAX69wIsq8myvGHPM5b+LW49CS23MZ7xWsP+2D7wQxlmzrEE+rzSZ/x\nPrmP\r\n=mQlm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDjeWOnwkcOuhuvu72QSgIuXB0QGXvzbZm5fZxUGg6ouQIhAJl3/VthvxoQ6pZa4NNzLe2duyo3mvyJb2BYP2OYklUC"}],"size":1782,"noattachment":false,"key":"/it-merge/-/it-merge-0.0.1.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_0.0.1_1611162003467_0.6881859638736618"},"_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":1611162003641,"_cnpm_publish_time":1611162003641,"dist-tags":{"latest":"3.0.15"}}