{"name":"stream-reduce","version":"1.0.0","description":"Reduce stream data to a single value","main":"index.js","scripts":{"test":"node test.js"},"repository":{"type":"git","url":"git@github.com:parshap/node-stream-reduce.git"},"keywords":["stream","reduce"],"author":{"name":"Parsha Pourkhomami"},"license":"Public Domain","devDependencies":{"tape":"~1.0.4"},"dependencies":{"through":"~2.3.4"},"bugs":{"url":"https://github.com/parshap/node-stream-reduce/issues"},"_id":"stream-reduce@1.0.0","dist":{"shasum":"629ef1dc3853231bc67ad779d7cddaa2f46c5db2","tarball":"http://registry-npm.ywwl.com/stream-reduce/download/stream-reduce-1.0.0.tgz","integrity":"sha512-DTQIhnN3/57rwJYXYZXN8C0VOj66KyQFyTRW09k52Mi9XRTCQYgyIRqcRD1VYUONJPat5Mqjq2BpV3RByTg6gg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCSyvvQkAipL1y/8ybWe7HiFvwPLWNS6oykvR71o1r4hgIgKXBUDPU4UPl0dCBxkJ3KsiR5Fqa6mttuZVUGz+AomaY="}],"size":1017,"noattachment":false,"key":"/stream-reduce/-/stream-reduce-1.0.0.tgz"},"_from":".","_npmVersion":"1.3.5","_npmUser":{"name":"parshap","email":"supster+npm@gmail.com"},"maintainers":[{"name":"parshap","email":"supster+npm@gmail.com"}],"directories":{},"readme":"# stream-reduce\n\nLike [`Array.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce)\nbut for streams. Given a sync reduce function and an initial value it\nwill return a through stream that emits a single data event with the\nreduced value once the input stream ends.\n\n# Example\n\n```js\nvar reduce = require(\"stream-reduce\");\n\nprocess.stdin.pipe(reduce(function(acc, data) {\n\treturn acc + data.length;\n}, 0)).on(\"data\", function(length) {\n\tconsole.log(\"stdin size:\", length);\n});\n```\n\n# Installation\n\n```\nnpm install stream-reduce\n```\n","publish_time":1376087304109,"_cnpm_publish_time":1376087304109,"dist-tags":{"latest":"1.0.3"}}