{"name":"stream-reduce","version":"1.0.2","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.2","dist":{"shasum":"5b8bea2a377d7df8b776893afd7fda8bc73d0a05","tarball":"http://registry-npm.ywwl.com/stream-reduce/download/stream-reduce-1.0.2.tgz","integrity":"sha512-H5gi7cz4OKDUJp295mbO1czyKaUgkXfNUNvmuHddneRXleJUtS/SvWK1+SZc39KA7M02K/vz4FiUtYvZg3J0CA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICeLEXHd4CvaxiXvgcoxOQXW255je7VdOmMoB5K5z8LmAiAmhCaNFoq4UnM3iFtfS3VIAPq0gelFFnXuCngpVWOgIg=="}],"size":1136,"noattachment":false,"key":"/stream-reduce/-/stream-reduce-1.0.2.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":1394218390823,"_cnpm_publish_time":1394218390823,"dist-tags":{"latest":"1.0.3"}}