{"name":"it-drain","version":"1.0.0","description":"Empties an async iterator","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","nyc":"^14.0.0","standard":"^14.3.1"},"gitHead":"5b782f17f3239062debad905c95b145a6b6e4e8e","_id":"it-drain@1.0.0","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.19.0/node@v10.17.0+x64 (darwin)","dist":{"integrity":"sha512-4oqyA3xvisuRV9kPvMDRMKllupxNrTEj5ajs66l1XP7cf7uro2LQS/lPMh310eHTj/Qz3ieiER0xr/lmtkhpGw==","shasum":"602ce2949460ea9e055362d5c3a1be2538a476c1","tarball":"http://registry-npm.ywwl.com/it-drain/download/it-drain-1.0.0.tgz","fileCount":4,"unpackedSize":1884,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeSqvOCRA9TVsSAnZWagAA+8AP/2k/0ipMx+ScaXH6lHLj\nhZyZQRnafvxBOl8GdeIunxyM6p4aQt578Xhq6PQ4oVNwS3PoG+Gr0PKwE5bw\n00ceV2vEsf/+OeXorrwsiVtX4sGF1hR22YYNo+2ZdBK2CCfONHMNj6gm+DaJ\nHg6/jxn5dYK4vMBfLw82b3zwiH8kQONM4vPasG8nN+sGA4LmbyPIeK411x5z\nXzzk9QzmLFAc+hD+sVpAbNKLfEb3gne0AG9lr5ZZtzsBTTdAhJwBKSJ+JFXI\nYbDT4TTunWot5VN6sAkHRRQ7QtgrwRzL3lvYnl4oX+rxqt1sp9HbnwjUSu12\nU+wNC4eFNQyn6+rB4nWAwCFcgzk8COGtDd6iEQJJcy5H/QNkcxzuET/bChpi\nKGIzMBFDNgaGokVnFpywqcqZ980BilZIRukvaTh/OeFNAm7DafqvlkbtHm6q\ndQyNN7i9wuCa1qYJyIZp8wjrLGa7bxYRjIcLCXLmixybKG3N6wzZLnvZZTuY\nYQxHx5nmrzY7p8MiFAhpxd2cmTiYfcgxuxt1g7rCgl3mXAO+xrKpMu9ucPpi\nFSpxKEkXyuf3Oj8bB9M3de+4MyraGJPJ/z+0O+/REVAkQeGIoh5LRA5cPY3A\nt+pIqH3OAKBcNo7kvOqPvNufw/1LCxnpyJPD07ORL+dvWAORoOYF5A7jVvX7\n6AYe\r\n=6HyJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCW9xCs9Rvu6GR8OmBosvgM/SY4mMtJIE76Q5JXIooKSQIgNPBfN6Zm/zQv1wdJRLCbPzfVqOAhu2q4wbzWLum/OqI="}],"size":1085,"noattachment":false,"key":"/it-drain/-/it-drain-1.0.0.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-drain_1.0.0_1581951950129_0.6243716792701433"},"_hasShrinkwrap":false,"readme":"# it-drain\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> Empties an async iterator\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\nMostly useful for tests or when you want to be explicit about consuming an iterable without doing anything with any yielded values.\n\n## Example\n\n```javascript\nimport drain from 'it-drain'\n\n// This can also be an iterator, generator, etc\nconst values = [0, 1, 2, 3, 4]\n\ndrain(values)\n```\n\nAsync sources must be awaited:\n\n```javascript\nimport drain from 'it-drain'\n\nconst values = async function * {\n  yield * [0, 1, 2, 3, 4]\n}\n\nawait drain(values())\n```\n\n# Install\n\n```console\n$ npm i it-drain\n```\n\n## Browser `<script>` tag\n\nLoading this module through a script tag will make it's exports available as `ItDrain` in the global namespace.\n\n```html\n<script src=\"https://unpkg.com/it-drain/dist/index.min.js\"></script>\n```\n\n# API Docs\n\n- <https://achingbrain.github.io/it/modules/it_drain.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-drain/LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)\n- MIT ([LICENSE-MIT](https://github.com/achingbrain/it/blob/main/packages/it-drain/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":1581951950345,"_cnpm_publish_time":1581951950345,"dist-tags":{"latest":"3.0.12"}}