{"_id":"streamsink","_rev":"3212965","name":"streamsink","description":"pipe to a buffer, then create readable streams from it","dist-tags":{"latest":"1.2.0"},"maintainers":[{"name":"superjoe","email":"superjoe30@gmail.com"}],"time":{"modified":"2024-02-28T06:15:51.000Z","created":"2014-03-04T10:16:24.339Z","1.2.0":"2014-10-09T18:03:13.208Z","1.1.1":"2014-10-09T17:53:06.699Z","1.1.0":"2014-10-09T17:46:38.644Z","1.0.1":"2014-03-18T22:55:02.278Z","1.0.0":"2014-03-04T10:16:24.339Z"},"users":{},"author":{"name":"Andrew Kelley","email":"superjoe30@gmail.com"},"repository":{"type":"git","url":"git://github.com/andrewrk/node-streamsink.git"},"versions":{"1.2.0":{"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","size":2022,"noattachment":false,"key":"/streamsink/-/streamsink-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/streamsink/download/streamsink-1.2.0.tgz"},"_from":".","_npmVersion":"1.3.10","_npmUser":{"name":"superjoe","email":"superjoe30@gmail.com"},"maintainers":[{"name":"superjoe","email":"superjoe30@gmail.com"}],"directories":{},"publish_time":1412877793208,"_hasShrinkwrap":false,"_cnpm_publish_time":1412877793208,"_cnpmcore_publish_time":"2021-12-15T11:14:13.521Z"},"1.1.1":{"name":"streamsink","version":"1.1.1","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.1.1","dist":{"shasum":"a4782b8182fbbecbca858f5fd500b216964ca585","size":1841,"noattachment":false,"key":"/streamsink/-/streamsink-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/streamsink/download/streamsink-1.1.1.tgz"},"_from":".","_npmVersion":"1.3.10","_npmUser":{"name":"superjoe","email":"superjoe30@gmail.com"},"maintainers":[{"name":"superjoe","email":"superjoe30@gmail.com"}],"directories":{},"publish_time":1412877186699,"_hasShrinkwrap":false,"_cnpm_publish_time":1412877186699,"_cnpmcore_publish_time":"2021-12-15T11:14:13.753Z"},"1.1.0":{"name":"streamsink","version":"1.1.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.1.0","dist":{"shasum":"e33955401129f55b9df790d8ed70b8c674683c04","size":1811,"noattachment":false,"key":"/streamsink/-/streamsink-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/streamsink/download/streamsink-1.1.0.tgz"},"_from":".","_npmVersion":"1.3.10","_npmUser":{"name":"superjoe","email":"superjoe30@gmail.com"},"maintainers":[{"name":"superjoe","email":"superjoe30@gmail.com"}],"directories":{},"publish_time":1412876798644,"_hasShrinkwrap":false,"_cnpm_publish_time":1412876798644,"_cnpmcore_publish_time":"2021-12-15T11:14:13.975Z"},"1.0.1":{"name":"streamsink","version":"1.0.1","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.0.1","dist":{"shasum":"625c591024a200c6473b2710c1f6e3a41e4ac1c3","size":985,"noattachment":false,"key":"/streamsink/-/streamsink-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/streamsink/download/streamsink-1.0.1.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"superjoe","email":"superjoe30@gmail.com"},"maintainers":[{"name":"superjoe","email":"superjoe30@gmail.com"}],"directories":{},"publish_time":1395183302278,"_hasShrinkwrap":false,"_cnpm_publish_time":1395183302278,"_cnpmcore_publish_time":"2021-12-15T11:14:14.182Z"},"1.0.0":{"name":"streamsink","version":"1.0.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.0.0","dist":{"shasum":"9f7136a96c2273f4a935bc080cf5d7e21a015df8","size":952,"noattachment":false,"key":"/streamsink/-/streamsink-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/streamsink/download/streamsink-1.0.0.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"superjoe","email":"superjoe30@gmail.com"},"maintainers":[{"name":"superjoe","email":"superjoe30@gmail.com"}],"directories":{},"publish_time":1393928184339,"_hasShrinkwrap":false,"_cnpm_publish_time":1393928184339,"_cnpmcore_publish_time":"2021-12-15T11:14:14.420Z"}},"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","_attachments":{},"homepage":"https://github.com/andrewrk/node-streamsink","bugs":{"url":"https://github.com/andrewrk/node-streamsink/issues"},"license":"MIT"}