{"_id":"tar-map-stream","_rev":"239676","name":"tar-map-stream","description":"Streaming mapping of tarball headers","dist-tags":{"latest":"1.0.0"},"maintainers":[{"name":"mafintosh","email":""}],"time":{"modified":"2023-03-24T16:56:57.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":""}],"dist":{"shasum":"2cf532922c66eb368b8b7339e389a4f206207cff","size":1975,"noattachment":false,"key":"/tar-map-stream/-/tar-map-stream-1.0.0.tgz","tarball":"http://name.csiicloud.com:7001/tar-map-stream/download/tar-map-stream-1.0.0.tgz"},"directories":{},"publish_time":1415963705994,"_hasShrinkwrap":false,"_cnpm_publish_time":1415963705994,"_cnpmcore_publish_time":"2021-12-16T15:36:35.664Z"}},"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"}