{"name":"stream-reduce","version":"1.0.1","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"},"_id":"stream-reduce@1.0.1","dist":{"shasum":"b7a5883c3b5d1450314d46b905fccd43df33c439","tarball":"http://registry-npm.ywwl.com/stream-reduce/download/stream-reduce-1.0.1.tgz","integrity":"sha512-awH0FqGhBcf/a3KsBrPGXvkYzzlbcWzShWGdEgHDMxDwCJAkIFmmGXUaWO4T45xhmv/P4rIZF4XJUlBT9lNehQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHonJxbxMFw190Hyo4VsVmNUgyymX0A5A0cGX7/4hRW6AiBjGfN0ei3uOq9O2b6AYto6dxC0AEcG2MqDA+tp0TqN8w=="}],"size":1166,"noattachment":false,"key":"/stream-reduce/-/stream-reduce-1.0.1.tgz"},"_from":".","_npmVersion":"1.2.18","_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":1384882417771,"_cnpm_publish_time":1384882417771,"dist-tags":{"latest":"1.0.3"}}