{"_id":"end-stream","_rev":"346695","name":"end-stream","description":"A stream that ends after computation finishes","dist-tags":{"latest":"0.1.0"},"maintainers":[{"name":"raynos","email":""}],"time":{"modified":"2021-06-20T02:42:08.000Z","created":"2012-11-18T01:52:44.865Z","0.1.0":"2012-11-18T01:52:44.865Z"},"users":{},"author":{"name":"Raynos","email":"raynos2@gmail.com"},"repository":{"type":"git","url":"git://github.com/Raynos/end-stream.git"},"versions":{"0.1.0":{"name":"end-stream","version":"0.1.0","description":"A stream that ends after computation finishes","keywords":[],"author":{"name":"Raynos","email":"raynos2@gmail.com"},"repository":{"type":"git","url":"git://github.com/Raynos/end-stream.git"},"main":"index","homepage":"https://github.com/Raynos/end-stream","contributors":[{"name":"Jake Verbaten"}],"bugs":{"url":"https://github.com/Raynos/end-stream/issues","email":"raynos2@gmail.com"},"dependencies":{"write-stream":"~0.4.3"},"devDependencies":{"tap":"~0.3.1"},"licenses":[{"type":"MIT","url":"http://github.com/Raynos/end-stream/raw/master/LICENSE"}],"scripts":{"test":"tap --stderr --tap ./test"},"readmeFilename":"README.md","_id":"end-stream@0.1.0","dist":{"shasum":"32003f3f438a2b0143168137f8fa6e9866c81ed5","size":1793,"noattachment":false,"key":"/end-stream/-/end-stream-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/end-stream/download/end-stream-0.1.0.tgz"},"_npmVersion":"1.1.65","_npmUser":{"name":"raynos","email":"raynos2@gmail.com"},"maintainers":[{"name":"raynos","email":""}],"directories":{},"publish_time":1353203564865,"_cnpm_publish_time":1353203564865,"_hasShrinkwrap":false}},"readme":"# end-stream\n\nA stream that ends after computation finishes\n\n## Example\n\nWhen you end this writable stream it will only emit `\"finish\"`\n    after it's finished asynchronously writing each chunk\n    you've written to the stream\n\n```js\nvar stream = EndStream(function write(value, cb) {\n    // do something async\n    async(value, function (err) {\n        // tell cb that your done writing it.\n        // Optionally pass it an err as a shorthand for\n        // stream.emit(\"error\", err)\n        cb(err)\n    })\n})\n\nstream.write(foo)\nstream.write(bar)\n\nstream.end()\nstream.on(\"finish\", function () {\n    // only called after both foo and bar have been\n    // asynchronously written. e.g. persisted to db.\n})\n```\n\n## Installation\n\n`npm install end-stream`\n\n## Contributors\n\n - Raynos\n\n## MIT Licenced\n","_attachments":{},"readmeFilename":"README.md","homepage":"https://github.com/Raynos/end-stream","bugs":{"url":"https://github.com/Raynos/end-stream/issues","email":"raynos2@gmail.com"}}