{"name":"stream-reduce","version":"1.0.3","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"},"homepage":"https://github.com/parshap/node-stream-reduce","_id":"stream-reduce@1.0.3","dist":{"shasum":"56d3621fa84370619ae402ffc0468528991b36a9","tarball":"http://registry-npm.ywwl.com/stream-reduce/download/stream-reduce-1.0.3.tgz","integrity":"sha512-2F9zNsWq1UzP4X091Mazl40P0WgnXmk6zRgkzH0HFpEV8ZWNfZP39pF09s6Ecm9Y5JfRhJHooKnxy0zURulxRg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD1YSzsPq0aemEpx8DStjgaQHCd1Y0CGbMreUHyhCxonwIhAObjjbSUARrz3gkamsbjpb8Q/Q8/B8GIIdjlmKbM4RVB"}],"size":1140,"noattachment":false,"key":"/stream-reduce/-/stream-reduce-1.0.3.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"parshap","email":"parshap+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":1394218420152,"_cnpm_publish_time":1394218420152,"dist-tags":{"latest":"1.0.3"}}