{"name":"thru","version":"0.0.2","description":"transform stream sugar","author":{"name":"Jesse Tane","email":"jesse.tane@gmail.com"},"dependencies":{"inherits":"2.0.1"},"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"},"homepage":"https://github.com/jessetane/thru","_id":"thru@0.0.2","dist":{"shasum":"efc82bc76553d20b6d808f267f71d3f8d5c6bf37","tarball":"http://registry-npm.ywwl.com/thru/download/thru-0.0.2.tgz","integrity":"sha512-GHoLfwZhu3hLUHdNrjqKh8bsSMLTJlgBFwA/Bj9z1bNMw+8aEeRbZQHL3lXQ02rv6XQN/iFRzmfIvcXv+fhAjw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEvoSqppG8E+2XSXTeAHnLsjxEATxkAm1LvMcNwpzBdbAiAGU9Wnc3+Aolqhb+HNO3oM0bkfhXNYL8enCdyCRjsTvQ=="}],"size":1115,"noattachment":false,"key":"/thru/-/thru-0.0.2.tgz"},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"jessetane","email":"jesse.tane@gmail.com"},"maintainers":[{"name":"jessetane","email":"jesse.tane@gmail.com"}],"directories":{},"publish_time":1385883867222,"_cnpm_publish_time":1385883867222,"dist-tags":{"latest":"0.4.4"}}