{"mos":{"plugins":["readme"],"installation":{"useShortAlias":true}},"bugs":{"url":"https://github.com/zkochan/unpack-stream/issues"},"dist":{"shasum":"13bf8b5f79e50627d86637783fc8b59afdbbc1ec","tarball":"https://registry.npmjs.org/unpack-stream/-/unpack-stream-5.0.0.tgz","fileCount":6,"integrity":"sha512-UyhS4VLTrf6pKwrQzIZjBeM5Z4LOzuhAWGb5YjaSUGxgk4cLraZ5VcPVAqQk/zi2sm6X53RxWS8Avt0jRW522A==","signatures":[{"sig":"MEUCIQDbyh3BjnKgE2CKJzPqjQgzZtPR+S2fq+bJ+OtMZCkL4AIgQXlYNtOcPIh6x9YcBACJtHgKMw9SBBfV2FFWWFzE8lU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11444,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcjjRGCRA9TVsSAnZWagAADTsP/3S38jQ6YiiSkauoo0wn\n80qQiycYyptzzvLBFRW+yC8Z+AOgQ06tOXwExHV66DB6Ug1EjG1zB/D5mN9X\n59RQKtNTdV5MZZg00ARkYftvvVQzQIWhkJbnB+XtHfBp+2jxidBsTKOr8grK\nIYQEXIMmHYP1gO6XqwKKldLAhdswf0wy+hKpyfiiar8ARfkWNbMUxQMiQxmv\ncQT32q0AlEHnFfNtWOlbpH3w0kCyr0i5ZERAinuH1DGaH64LH/B/mui8spcg\nsp3UA8u1vOVpdjaGZJS7/yOHG5wIZXINc4c6Xy3Az7BqZpZwK+vBDyuvH6jU\nsw7zb9lyBRENXQmlyFHPhDPHLOcusErAF5nk1MUFXKqN+oebGxC0nQTCDjq2\njODMM6btOh4T8HiV6wrIqve3dgUyUSG+FnfzLtBIVZ9FPgyBO4w6wonGvGV+\nXmKuV3H9yTh9RidWss8JKUQUTBFydygZH5PCFJD9Z/8ZtL1Pp4Ta1Z/F7ejG\nbEmQlcfpGW0cKPr3oZE7Oa1IZ3IxanYzXxEt1EJJ7o9o7c63UtgP2xU61aQZ\nevve3GsXwfHExNiMWW7QpmCwA4S+PV8DS5Xhj4JLOCOmdtNWkctfBMLgnuwm\n8xUyRz6kocqkfeU/Nk6GI8nj1lZYLEHj+FpEMt/ex+6vfEOkR/92UsXRpF/0\nSOuB\r\n=CLzS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","name":"unpack-stream","author":{"url":"https://www.kochan.io","name":"Zoltan Kochan","email":"z@kochan.io"},"readme":"# unpack-stream\n\n> Unpack a tarball stream\n\n<!--@shields('npm', 'travis')-->\n[![npm version](https://img.shields.io/npm/v/unpack-stream.svg)](https://www.npmjs.com/package/unpack-stream) [![Build Status](https://img.shields.io/travis/zkochan/unpack-stream/master.svg)](https://travis-ci.org/zkochan/unpack-stream)\n<!--/@-->\n\n## Installation\n\n```sh\nnpm i -S unpack-stream\n```\n\n## Usage\n\n<!--@example('./example.js')-->\n```js\n'use strict'\nconst got = require('got')\nconst unpackStream = require('unpack-stream')\n\nconst tarball = 'https://registry.npmjs.org/is-negative/-/is-negative-2.1.0.tgz'\nconst stream = got.stream(tarball)\nunpackStream.remote(stream, './tmp')\n  .then(index =>\n    Promise.all(\n      Object.keys(index)\n        .map(filename =>\n          index[filename].generatingIntegrity.then(integrity => ({filename, integrity})))\n    )\n  )\n  .then(files => console.log(files))\n  //> [ { filename: 'package.json',\n  //      integrity: 'sha512-RA0APKvtxz85WYCFX3M/TkVeJZZBcylEwh+GrV7uO/NNJO4G3rzgTrpsypp9AU2hM2QBk9SxCHi1Gb9aaWzpYg==' },\n  //    { filename: 'index.js',\n  //      integrity: 'sha512-3dL1OHn8VWhVDT37f3ZBdou4NrYq2ll//W1lWqx7+4tKBW/WqUx3mDcGyqrBfBeWTIPCd+RiUdF7hp3MQYB9+g==' },\n  //    { filename: 'license',\n  //      integrity: 'sha512-lSw93JVg7wfwyVXKrg6yIFjF9Bidgr+tA/l6XNlrRhjnE6NhwkyPL3xNL47OZScS8qoQkYUwE6slmo7jGesH0Q==' },\n  //    { filename: 'readme.md',\n  //      integrity: 'sha512-fM882axp7XaC6nzj5XYuzB0KhYpYwwsR3RjyiqOcIrI6C0b9KxrEEug9VpKTfbSbqTOmZ2KEqZLPKrMXFW1Y+g==' } ]\n```\n<!--/@-->\n\n## API\n\n### `remote(stream, destination, [opts]): Promise<Index>`\n\nUnpacks a remote stream fetched via HTTP.\n\n**Arguments:**\n\n- `stream` - _Stream_\n- `destination` - _string_ - the directory to which the stream will be unpacked\n- `[opts.shasum]` - _string_ - shasum to verify tarball\n- `[opts.onStart]` - _Function_ - called on download start\n- `[opts.onProgress]` - _(downloaded, size) => void_ - tracks the download progress\n- `[opts.generateIntegrity]` - _Boolean_ - `true` by default. If `true`, generates [Subresource Integrity](https://w3c.github.io/webappsec-subresource-integrity/) for each unpacked file\n- `[opts.ignore]` - `(filename: string) => boolean` - a function that decides whether a file should be unpacked from the tarball.\n\n### `local(stream, destination, [opts]): Promise<Index>`\n\nUnpacks a stream from the local filesystem.\n\n**Arguments:**\n\n- `[opts.generateIntegrity]` - _Boolean_ - `true` by default. If `true`, generates [Subresource Integrity](https://w3c.github.io/webappsec-subresource-integrity/) for each unpacked file\n- `[opts.ignore]` - `(filename: string) => boolean` - a function that decides whether a file should be unpacked from the tarball.\n\n## License\n\n[MIT](./LICENSE) © [Zoltan Kochan](https://www.kochan.io)\n","engines":{"node":">=8"},"gitHead":"4b428813b395a21850ee662389089e9bac78c337","license":"MIT","scripts":{"md":"preview && mos README.md","tsc":"rimraf dist && tsc","test":"npm run tsc && preview && ts-node test --type-check","pretest":"rimraf test/dest","prepublishOnly":"npm run tsc"},"typings":"dist/index.d.ts","_npmUser":{"name":"zkochan","email":"z@kochan.io"},"homepage":"https://github.com/zkochan/unpack-stream#readme","keywords":["tarball","stream","unpack"],"repository":{"url":"git+https://github.com/zkochan/unpack-stream.git","type":"git"},"_npmVersion":"6.9.0","description":"Unpack a tarball stream","directories":{},"maintainers":[{"name":"zkochan","email":"zoltan.kochan@gmail.com"}],"_nodeVersion":"10.12.0","dependencies":{"ssri":"^6.0.0","tar-fs":"^2.0.0","@types/node":"*","decompress-maybe":"^1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^9.6.0","mos":"^2.0.0-alpha.3","tape":"^4.7.0","rimraf":"^2.6.1","ts-node":"^8.0.2","ignorable":"^1.0.1","typescript":"^3.0.0","@types/tape":"^4.2.30","package-preview":"^2.0.0","mos-plugin-readme":"^1.0.4"},"_npmOperationalInternal":{"tmp":"tmp/unpack-stream_5.0.0_1552823365600_0.0013560467468840542","host":"s3://npm-registry-packages"},"_id":"unpack-stream@5.0.0","version":"5.0.0"}