{"_id":"stream-reduce","_rev":"209022","name":"stream-reduce","description":"Reduce stream data to a single value","dist-tags":{"latest":"1.0.3"},"maintainers":[{"name":"parshap","email":"parshap+npm@gmail.com"}],"time":{"modified":"2021-06-03T15:24:07.000Z","created":"2013-08-09T22:28:24.109Z","1.0.3":"2014-03-07T18:53:40.152Z","1.0.2":"2014-03-07T18:53:10.823Z","1.0.1":"2013-11-19T17:33:37.771Z","1.0.0":"2013-08-09T22:28:24.109Z"},"users":{"edobry":true},"author":{"name":"Parsha Pourkhomami"},"repository":{"type":"git","url":"git@github.com:parshap/node-stream-reduce.git"},"versions":{"1.0.3":{"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","size":1140,"noattachment":false,"key":"/stream-reduce/-/stream-reduce-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/stream-reduce/download/stream-reduce-1.0.3.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"parshap","email":"parshap+npm@gmail.com"},"maintainers":[{"name":"parshap","email":"parshap+npm@gmail.com"}],"directories":{},"publish_time":1394218420152,"_cnpm_publish_time":1394218420152,"_hasShrinkwrap":false},"1.0.2":{"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","size":1136,"noattachment":false,"key":"/stream-reduce/-/stream-reduce-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/stream-reduce/download/stream-reduce-1.0.2.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"parshap","email":"parshap+npm@gmail.com"},"maintainers":[{"name":"parshap","email":"parshap+npm@gmail.com"}],"directories":{},"publish_time":1394218390823,"_cnpm_publish_time":1394218390823,"_hasShrinkwrap":false},"1.0.1":{"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"},"readmeFilename":"README.md","_id":"stream-reduce@1.0.1","dist":{"shasum":"b7a5883c3b5d1450314d46b905fccd43df33c439","size":1166,"noattachment":false,"key":"/stream-reduce/-/stream-reduce-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/stream-reduce/download/stream-reduce-1.0.1.tgz"},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"parshap","email":"supster+npm@gmail.com"},"maintainers":[{"name":"parshap","email":"parshap+npm@gmail.com"}],"directories":{},"publish_time":1384882417771,"_cnpm_publish_time":1384882417771,"_hasShrinkwrap":false},"1.0.0":{"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"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/parshap/node-stream-reduce/issues"},"_id":"stream-reduce@1.0.0","dist":{"shasum":"629ef1dc3853231bc67ad779d7cddaa2f46c5db2","size":1017,"noattachment":false,"key":"/stream-reduce/-/stream-reduce-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/stream-reduce/download/stream-reduce-1.0.0.tgz"},"_from":".","_npmVersion":"1.3.5","_npmUser":{"name":"parshap","email":"supster+npm@gmail.com"},"maintainers":[{"name":"parshap","email":"parshap+npm@gmail.com"}],"directories":{},"publish_time":1376087304109,"_cnpm_publish_time":1376087304109,"_hasShrinkwrap":false}},"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","_attachments":{},"homepage":"https://github.com/parshap/node-stream-reduce","bugs":{"url":"https://github.com/parshap/node-stream-reduce/issues"},"license":"Public Domain"}