{"name":"streamsink","version":"1.2.0","description":"pipe to a buffer, then create readable streams from it","main":"index.js","scripts":{"test":"node test.js"},"repository":{"type":"git","url":"git://github.com/andrewrk/node-streamsink.git"},"author":{"name":"Andrew Kelley","email":"superjoe30@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/andrewrk/node-streamsink/issues"},"homepage":"https://github.com/andrewrk/node-streamsink","_id":"streamsink@1.2.0","dist":{"shasum":"efafee9f1e22d3591ed7de3dcaa95c3f5e79f73c","tarball":"http://registry-npm.ywwl.com/streamsink/download/streamsink-1.2.0.tgz","integrity":"sha512-MJ440L2+j2vmc1v8Z/BkMx3X+HsJ++V7mgDROboQKxqCLZdNbu+AeSwQbayXw3LPHVAMxw+h7ZJUnyFYl/zp2g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC3SCYgWHzZeKfAe2bODXNlVev7sRi2WEOAkAwoElrWKAiEApqaBmqcHLqxNrDx9ULVUVXbMJToFQ7eTBZJQC7B0bpQ="}],"size":2022,"noattachment":false,"key":"/streamsink/-/streamsink-1.2.0.tgz"},"_from":".","_npmVersion":"1.3.10","_npmUser":{"name":"superjoe","email":"superjoe30@gmail.com"},"maintainers":[{"name":"superjoe","email":"superjoe30@gmail.com"}],"readme":"# node-streamsink\n\nPipe a stream to a `StreamSink`, and then you can create a `ReadableStream`,\n`String`, or `Buffer` from the `StreamSink`.\n\n## Usage\n\n```js\nvar StreamSink = require('streamsink');\n\nvar sink = new StreamSink();\n\nfs.createReadStream(\"foo.txt\").pipe(sink);\nsink.on('finish', function() {\n  // sink has now buffered foo.txt\n  sink.createReadStream().pipe(someDestination);\n\n  // or use toString([encoding], [start], [end])\n  console.log(sink.toString('utf8'));\n\n  // or use toBuffer()\n  sink.toBuffer();\n});\n\n// you can also create instances from a list of buffers\nvar sink = StreamSink.fromBufferList([new Buffer(\"aoeu\"), new Buffer(\"foo\")]);\n```\n","publish_time":1412877793208,"_cnpm_publish_time":1412877793208,"dist-tags":{"latest":"1.2.0"}}