{"name":"it-last","version":"1.0.5","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 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","devDependencies":{"ava":"^3.12.1","nyc":"^15.1.0","standard":"^16.0.3","typescript":"^4.0.2"},"types":"dist/index.d.ts","_id":"it-last@1.0.5","_nodeVersion":"14.15.4","_npmVersion":"6.14.10","dist":{"integrity":"sha512-PV/2S4zg5g6dkVuKfgrQfN2rUN4wdTI1FzyAvU+i8RV96syut40pa2s9Dut5X7SkjwA3P0tOhLABLdnOJ0Y/4Q==","shasum":"5c711c7d58948bcbc8e0cb129af3a039ba2a585b","tarball":"http://registry-npm.ywwl.com/it-last/download/it-last-1.0.5.tgz","fileCount":7,"unpackedSize":2703,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJth6CRA9TVsSAnZWagAA2QMP/RV8yfQdry2aY5ci8G2g\npY53ufCdiHAoB/FsaVID8rwLYRLO+QWjGpV4/05wdFMGx6zbRrrJtpTZli0v\neEVUngm7u7hN2UXW51ppLsxZ2FDxPxoNMx+7CEoJske3iO0m4w8LnlmZ+p4s\nc3m8kR5xUkA8lSY+tx1PvcmKCVza3n+sIKj7I2ZEP2NvV9ztlERLh5pUBZ+i\ndSmqEXeCPTv1H0hVq4tzRCA+ofrb5+fOL5xb58wHJRo9WEhaJNRlKbQXfwhC\nGaHdTKoLuwH4y1HBddXubU86KD6hDbMAf9lM4yIvh/kouJT+guN+b9GplOXl\ng9ykGPOiSQJTFgP1Kv6pJsFdUk6PcpK5Ms5vlBITRXp/iCHfhyrjqFOjJ9eO\nVmyPbuIYWJVoc9TALE4hg8pjeE4ESyNxPkGalSXtgOv8UKYhwCeIv9h8BwjH\nDY9dKM3N9JDw6eTOA1tVkYVnkVhYSZflTIfLAs3RmYgANgxUXFircrpccxii\nzpepCuVKXm6LuBIgkUQx/PDGgSCm2DBklgba5tfeQjVTdQynmpGvOrhrye9N\nNABT3iESAcf8laPAC4ytRDGPFIxv3zOu7aR2h4WEllodRHoxJZ7oVpbfbcmV\nh9A4vKf8K+1fxLW7SJtECleo4mrAuDhaiZWc8y8t4WYQerUE8dDj29/yXTS4\nhNUg\r\n=o01R\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCJlbWg2l6OSJA0mPlVdq309dtBLhSOHOTwNV+DXH8HNwIgCC61XSbSQlyo+QVbLzKHZ373Wa10m6Moq9Qyh7RpW0U="}],"size":1420,"noattachment":false,"key":"/it-last/-/it-last-1.0.5.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-last_1.0.5_1613158522007_0.9640554772567553"},"_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":1613158522114,"_cnpm_publish_time":1613158522114,"dist-tags":{"latest":"3.0.11"}}