{"name":"thru","version":"0.0.1","description":"minimalist transform stream implementation","author":{"name":"Jesse Tane","email":"jesse.tane@gmail.com"},"repository":{"type":"git","url":"https://github.com/jessetane/thru.git"},"readme":"# thru\nminimalist transform stream implementation\n\n## why\nsugar for [`stream.Transform`](http://nodejs.org/api/stream.html#stream_class_stream_transform)\n\n## how\n```javascript\nvar thru = require('thru');\n\nvar input = thru();\n\nvar inflate = thru(function(obj, cb) {\n  if (obj === 'a') {\n    this.push('a');\n    this.push('b');\n    cb();\n  } else {\n    cb(null, obj);\n  }\n});\n\nvar modify = thru(function(obj, cb) {\n  if (obj === 'd') obj = 'c';\n  cb(null, obj);\n});\n\nvar deflate = thru(function(obj, cb) {\n  if (obj === 'e') cb();\n  else cb(null, obj);\n});\n\nvar newlines = thru(function(obj, cb) {\n  cb(null, obj + '\\n');\n});\n\ninput\n  .pipe(inflate)\n  .pipe(modify)\n  .pipe(deflate)\n  .pipe(newlines)\n  .pipe(process.stdout);\n\nnewlines.on('end', function() {\n  console.log('done!');\n});\n\ninput.write('a'); // a\n                  // b\ninput.write('d'); // c\ninput.write('e');\ninput.end();      // done!\n```\n\n## inspiration\n[through](https://github.com/dominictarr/through)  \n[through2](https://github.com/rvagg/through2)\n\n## license\nWTFPL","readmeFilename":"readme.md","bugs":{"url":"https://github.com/jessetane/thru/issues"},"_id":"thru@0.0.1","dist":{"shasum":"65e6b638684227a412b777f552eedce1a07f728a","tarball":"http://registry-npm.ywwl.com/thru/download/thru-0.0.1.tgz","integrity":"sha512-6t0gCOwr18UUWxwjVQBn4ahxq8mNH/jlYB0mAJgHn29Q2T4VEkNMD7zRBUOQ2FxH+CeatsB1UcZnegFk/UCX3w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCXTPALzLnreyut2AsCGny29CzHt+PMLo3jIrtZgtINJgIhAIb4wsVqY4gaQNgPWgL1Egm/gswqDEkHyGmBNg+bzaEn"}],"size":959,"noattachment":false,"key":"/thru/-/thru-0.0.1.tgz"},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"jessetane","email":"jesse.tane@gmail.com"},"maintainers":[{"name":"jessetane","email":"jesse.tane@gmail.com"}],"directories":{},"publish_time":1384234290446,"_cnpm_publish_time":1384234290446,"dist-tags":{"latest":"0.4.4"}}