{"id":13526625,"url":"https://github.com/parshap/node-stream-reduce","last_synced_at":"2025-07-14T20:31:30.952Z","repository":{"id":9983140,"uuid":"12011707","full_name":"parshap/node-stream-reduce","owner":"parshap","description":"Reduce stream data to a single value","archived":false,"fork":false,"pushed_at":"2014-03-07T18:53:41.000Z","size":140,"stargazers_count":20,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-04T10:44:31.096Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/parshap.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-08-09T22:22:27.000Z","updated_at":"2022-09-04T17:37:09.000Z","dependencies_parsed_at":"2022-09-02T16:58:29.324Z","dependency_job_id":null,"html_url":"https://github.com/parshap/node-stream-reduce","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/parshap/node-stream-reduce","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parshap%2Fnode-stream-reduce","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parshap%2Fnode-stream-reduce/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parshap%2Fnode-stream-reduce/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parshap%2Fnode-stream-reduce/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parshap","download_url":"https://codeload.github.com/parshap/node-stream-reduce/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parshap%2Fnode-stream-reduce/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265344830,"owners_count":23750566,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T06:01:32.348Z","updated_at":"2025-07-14T20:31:30.668Z","avatar_url":"https://github.com/parshap.png","language":"JavaScript","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","funding_links":[],"categories":["Repository","JavaScript","Modules"],"sub_categories":["Streams"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparshap%2Fnode-stream-reduce","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparshap%2Fnode-stream-reduce","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparshap%2Fnode-stream-reduce/lists"}