{"_id":"tar-map-stream","_rev":"319321","name":"tar-map-stream","description":"Streaming mapping of tarball headers","dist-tags":{"latest":"1.0.0"},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"time":{"modified":"2024-06-17T19:01:18.000Z","created":"2014-11-14T11:15:05.994Z","1.0.0":"2014-11-14T11:15:05.994Z"},"users":{},"author":{"name":"Mathias Buus","url":"@mafintosh"},"repository":{"type":"git","url":"https://github.com/mafintosh/tar-map-stream.git"},"versions":{"1.0.0":{"name":"tar-map-stream","version":"1.0.0","description":"Streaming mapping of tarball headers","main":"index.js","dependencies":{"duplexify":"^3.2.0","pump":"^1.0.0","tar-stream":"^1.0.2"},"devDependencies":{"concat-stream":"^1.4.6","tape":"^3.0.3"},"scripts":{"test":"tape test.js"},"repository":{"type":"git","url":"https://github.com/mafintosh/tar-map-stream.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/tar-map-stream/issues"},"homepage":"https://github.com/mafintosh/tar-map-stream","gitHead":"b1604e7846cda5eaefeaa5b8229afb75f72d2911","_id":"tar-map-stream@1.0.0","_shasum":"2cf532922c66eb368b8b7339e389a4f206207cff","_from":".","_npmVersion":"2.1.7","_nodeVersion":"0.10.33","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"dist":{"shasum":"2cf532922c66eb368b8b7339e389a4f206207cff","tarball":"http://registry-npm.ywwl.com/tar-map-stream/download/tar-map-stream-1.0.0.tgz","integrity":"sha512-01DvLrT/ssu/okawMVejBOIMILMJCMIIwb8nYuAYXMey4HLXkLj+VSzxyUzOo/wohxrIqsRA5qgm7Z9NMJhMLA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDvxRvNmG7JodcWrCGrlTbk0cY9WC2YbNOXAaXQSgLb6wIhANwi8HS2nvafDmSOkv7I0RVmSPmNrLAvYBtwxw8U1vqY"}],"size":1975,"noattachment":false,"key":"/tar-map-stream/-/tar-map-stream-1.0.0.tgz"},"directories":{},"publish_time":1415963705994,"_cnpm_publish_time":1415963705994}},"readme":"# tar-map-stream\n\nStreaming mapping of tarball headers\n\n```\nnpm install tar-map-stream\n```\n\n[![build status](http://img.shields.io/travis/mafintosh/tar-map-stream.svg?style=flat)](http://travis-ci.org/mafintosh/tar-map-stream)\n\n## Usage\n\n``` js\nvar map = require('tar-map-stream')\n\n// map returns a duplex stream\nvar stream = map(function(header) {\n  // this function is run on every tar header\n  // strip one level\n  header.name = header.name.split('/').slice(1).join('/')\n\n  // return null to remove this file from the tarball\n  // or return the modified header\n  return header\n})\n\nfs.createReadStream('archive.tar')\n  .pipe(stream)\n  .pipe(fs.createWriteStream('stripped-archive.tar'))\n```\n\n## License\n\nMIT\n","_attachments":{},"homepage":"https://github.com/mafintosh/tar-map-stream","bugs":{"url":"https://github.com/mafintosh/tar-map-stream/issues"},"license":"MIT"}