{"name":"unpack-stream","version":"3.0.3","description":"Unpack a tarball stream","main":"dist/index.js","typings":"dist/index.d.ts","files":["dist/"],"scripts":{"pretest":"rimraf test/dest","test":"npm run tsc && preview && ts-node test --type-check","md":"preview && mos README.md","tsc":"rimraf dist && tsc","prepublishOnly":"npm run tsc"},"repository":{"type":"git","url":"git+https://github.com/zkochan/unpack-stream.git"},"keywords":["tarball","stream","unpack"],"author":{"name":"Zoltan Kochan","email":"z@kochan.io","url":"https://www.kochan.io"},"license":"MIT","bugs":{"url":"https://github.com/zkochan/unpack-stream/issues"},"homepage":"https://github.com/zkochan/unpack-stream#readme","dependencies":{"@types/node":"^10.0.8","decompress-maybe":"^1.0.0","ssri":"^5.0.0","tar-fs":"^1.14.0"},"devDependencies":{"@types/tape":"^4.2.30","got":"^8.0.0","ignorable":"^1.0.1","mos":"^2.0.0-alpha.3","mos-plugin-readme":"^1.0.4","package-preview":"^1.0.0","rimraf":"^2.6.1","tape":"^4.7.0","ts-node":"^6.0.0","typescript":"^2.4.2"},"mos":{"plugins":["readme"],"installation":{"useShortAlias":true}},"engines":{"node":">=4"},"gitHead":"b464aa3c5599d5048a155d2521a269438f82e8d9","_id":"unpack-stream@3.0.3","_npmVersion":"6.0.1","_nodeVersion":"9.10.1","_npmUser":{"name":"zkochan","email":"z@kochan.io"},"dist":{"integrity":"sha512-h3Ii7ThTL7P5LlX1RuMPsuW4V5EZnLyjPwStIMQ4V0F6rblgmXIS+IkpAOu9THHDZYUO/D8TTJddVc6HIY4S5g==","shasum":"b7d3fc9d5c8ea224ea15e63848e4d9785dcb09d6","tarball":"http://registry-npm.ywwl.com/unpack-stream/download/unpack-stream-3.0.3.tgz","fileCount":6,"unpackedSize":11525,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa9rtDCRA9TVsSAnZWagAABNIQAIio213WVnGUPqLTzyNG\nqOQnnP+hAlDJ4hf3Vbdc+2sdKK0MefykzgkjE3RFkQhs8Ag8iINPfR11A4kX\nDyP6L0j4+3n4NP3kHiHfTRr7TRgCP537y5hdpjC7WtlAjn/ET3yvvhJ9/F95\n80FYNgFKkRslTKADhuDLlbNW6n0dlpwrg4+v4xXGyW1Vp4i+M+xX20CSepv4\nTr1fYT67JuE4luqzgWKHu/fOhYTNvNomT/KwjCL0d2LHH3ZReLlBeAvh6hZ8\nr1YlJTnzAW/6AqUkBt6e+sXPKqZoGYCSWOy6g05Y/Yc3JsPhl2Gvn2eovhbW\n2HxLkARhDoPwOvCKZR9oJzJvmhEcvYwqTiO9FY9eXiUtl/QhU/YbyTTYvOwW\nGdNSh4PI3uzhjkNJ698A37L2pBDfBHgRu2Qom6/k0o8Je5WWMSde5ypZEx1e\njEo5R8S+ZWVNtLvgCGvcG58jMHyL+j1NMpu707SS+cd0tchIdLfDTPDzFsoS\ndnC5KIn1oJGQ2N4LG9I37Yoz6jnBAdMtvf7+ekFVNpFuMQ+Zu6l8fKWlEgzs\n+Gr9n7osW92Z+frdzMZHq2cpO1Q7gfnkWYriuJjCKv/7Sl2jS6fQS0SXKv9n\nXMD0hkAAiRcn8Zp1zGGEXhI9KmQxeuIvbfN2krQHZFOSmU7eEcHUZbhl1M1Y\nSheW\r\n=poII\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD7Usf+ZHdwOB9feLa24/d3V3a8EfJrDb4YvHYvsR+QcQIgZ2mwTg2Eq+5qvvWpek4F6vu4HWGOby9DOrArAeidyyY="}],"size":4548,"noattachment":false,"key":"/unpack-stream/-/unpack-stream-3.0.3.tgz"},"maintainers":[{"name":"zkochan","email":"zoltan.kochan@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/unpack-stream_3.0.3_1526119234245_0.058890611814039984"},"_hasShrinkwrap":false,"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","publish_time":1526119234681,"_cnpm_publish_time":1526119234681,"dist-tags":{"beta":"0.1.1","latest":"6.0.0","next":"5.0.1"}}