{"name":"it-last","version":"1.0.1","description":"Returns the last result from 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":"92319e3234c9361cee162c3e4ff5648770028f2a","_id":"it-last@1.0.1","_nodeVersion":"12.13.0","_npmVersion":"lerna/3.19.0/node@v12.13.0+x64 (darwin)","dist":{"integrity":"sha512-U2dRwMb0cqz3OVc47y5FiGFzZwbEScHTc6RhTKOnKMidUpyjoX0Au6Zta5DQZSuwwB6RrQ6ao8jAFUN6SlyQWw==","shasum":"079b10f632a0e09865f141ce4c2330d423e50d10","tarball":"http://registry-npm.ywwl.com/it-last/download/it-last-1.0.1.tgz","fileCount":26,"unpackedSize":82428,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3XACCRA9TVsSAnZWagAAcGYP/RB/Z8VooSNA8lIREcuw\nGof9sRd9YfitZu8F3Dx5SLh/svyn7xUm8vlFF6lwiKYIMRy4oTmupNrGwi4Y\nB/ci/INWjifW7VtKwS+vfV3K2fX7EXCatpHr6d7KrcrAAeP6LIO5bknqdr3f\nWVQ96m+BK1GtbkcjYyp5FWgyqbdw+xQgtPnrSYNL//l1ISxDDbQhN5aT+48B\n/yDpgC8J1jkvpgRAdGmMePFZVXb/uCPqVr+bO6qN/5AWmRhlpPoruWC/Vbtp\nb5cEGnh1uheihjx9DnQFZAViR5DJG+gkTVu/S3+H022VLkCujIyaGkOh1+2e\niyaQc9yGxxe4o6d1STbXbRNHMSy+M89uJk31CMY6HiVTTtynIk6+cp4SQkN8\nNjnELqcpWa1wkrmOasNIkJa9tB3j+jFi4B9b4gbzNkyM8JGVfoH4HyyEieyl\ng3LzAQPyeynrSYsM3np3gU+k5SmT0zByXkY28kSBJg17Hup++hqKRigZZmZL\nOWGAw87yQko/sFkRxRfjZA3xCKtj3Ft1RoeJjd+iHcszXI6A9dIJErLglMkP\ngTsB4aG/lAekkSvYiaJ4K3R8gD9LqHAPma86g9mLyrcnhoqfVhR9Ajyl37oD\nv2I65jD706fau6USebjSNLXP5bZBzlqwNh5dTE9amq5ksKk/WEVsCQhw/4fK\n50gR\r\n=1fSV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDOJrYMtHqH0C7TxWyov7/ykObeH/w9CRSpPeyz99GigQIhAMksNM136BCYNKtoUV0Q3tZIuDFFs1B3QE3pkYcyDjSh"}],"size":15549,"noattachment":false,"key":"/it-last/-/it-last-1.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-last_1.0.1_1574793218427_0.8085188163592947"},"_hasShrinkwrap":false,"readme":"# it-last\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> Returns the last result from 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\nReturn the last value from an (async)iterable.\n\n## Example\n\n```javascript\nimport last from 'it-last'\n\n// This can also be an iterator, generator, etc\nconst values = [0, 1, 2, 3, 4]\n\nconst res = last(values)\n\nconsole.info(res) // 4\n```\n\nAsync sources must be awaited:\n\n```javascript\nimport last from 'it-last'\n\nconst values = async function * () {\n  yield * [0, 1, 2, 3, 4]\n}\n\nconst res = await last(values())\n\nconsole.info(res) // 4\n```\n\n# Install\n\n```console\n$ npm i it-last\n```\n\n## Browser `<script>` tag\n\nLoading this module through a script tag will make it's exports available as `ItLast` in the global namespace.\n\n```html\n<script src=\"https://unpkg.com/it-last/dist/index.min.js\"></script>\n```\n\n# API Docs\n\n- <https://achingbrain.github.io/it/modules/it_last.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-last/LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)\n- MIT ([LICENSE-MIT](https://github.com/achingbrain/it/blob/main/packages/it-last/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":1574793218577,"_cnpm_publish_time":1574793218577,"dist-tags":{"latest":"3.0.11"}}