{"id":13526610,"url":"https://github.com/mafintosh/stream-each","last_synced_at":"2025-04-09T18:19:55.535Z","repository":{"id":57371995,"uuid":"44495624","full_name":"mafintosh/stream-each","owner":"mafintosh","description":"Iterate all the data in a stream","archived":false,"fork":false,"pushed_at":"2018-07-30T17:59:00.000Z","size":11,"stargazers_count":37,"open_issues_count":2,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-09T18:19:40.902Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mafintosh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-18T20:40:24.000Z","updated_at":"2021-01-13T19:47:46.000Z","dependencies_parsed_at":"2022-09-15T17:01:10.649Z","dependency_job_id":null,"html_url":"https://github.com/mafintosh/stream-each","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mafintosh%2Fstream-each","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mafintosh%2Fstream-each/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mafintosh%2Fstream-each/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mafintosh%2Fstream-each/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mafintosh","download_url":"https://codeload.github.com/mafintosh/stream-each/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248085325,"owners_count":21045139,"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.182Z","updated_at":"2025-04-09T18:19:55.505Z","avatar_url":"https://github.com/mafintosh.png","language":"JavaScript","readme":"# stream-each\n\nIterate all the data in a stream\n\n```\nnpm install stream-each\n```\n\n[![build status](http://img.shields.io/travis/mafintosh/stream-each.svg?style=flat)](http://travis-ci.org/mafintosh/stream-each)\n\n## Usage\n\n``` js\nvar each = require('stream-each')\n\neach(stream, function (data, next) {\n  console.log('data from stream', data)\n  // when ready to consume next chunk\n  next()\n}, function (err) {\n  console.log('no more data')\n})\n```\n\n## API\n\n#### `each(stream, iterator, cb)`\n\nIterate the data in the stream by calling the iterator function with `(data, next)`\nwhere data is a data chunk and next is a callback. Call next when you are ready to\nconsume the next chunk. Optionally you can call next with an error to destroy the stream\n\nWhen the stream ends/errors the callback is called if provided\n\n## License\n\nMIT\n\n## Related\n\n`stream-each` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.\n","funding_links":[],"categories":["Repository","Modules"],"sub_categories":["Streams"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmafintosh%2Fstream-each","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmafintosh%2Fstream-each","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmafintosh%2Fstream-each/lists"}