{"id":15743812,"url":"https://github.com/doowb/iterator-streams","last_synced_at":"2025-03-13T10:31:00.098Z","repository":{"id":33728230,"uuid":"37382528","full_name":"doowb/iterator-streams","owner":"doowb","description":"Iterate over a stack of streams.","archived":false,"fork":false,"pushed_at":"2015-10-16T03:03:56.000Z","size":568,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-25T23:35:29.491Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"kaitai-io/kaitai_struct_compiler","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/doowb.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-06-13T18:15:08.000Z","updated_at":"2021-04-12T22:07:13.000Z","dependencies_parsed_at":"2022-06-27T11:03:48.895Z","dependency_job_id":null,"html_url":"https://github.com/doowb/iterator-streams","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Fiterator-streams","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Fiterator-streams/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Fiterator-streams/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Fiterator-streams/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/doowb","download_url":"https://codeload.github.com/doowb/iterator-streams/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243385894,"owners_count":20282644,"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-10-04T03:21:30.830Z","updated_at":"2025-03-13T10:30:59.810Z","avatar_url":"https://github.com/doowb.png","language":"JavaScript","readme":"# iterator-streams [![NPM version](https://badge.fury.io/js/iterator-streams.svg)](http://badge.fury.io/js/iterator-streams)  [![Build Status](https://travis-ci.org/doowb/iterator-streams.svg)](https://travis-ci.org/doowb/iterator-streams)\n\n\u003e Iterate over a stack of streams.\n\nThis module is intended to be used with [loader-cache](https://github.com/jonschlinkert/loader-cache)but may be used by itself or in other modules.\n\nInstall with [npm](https://www.npmjs.com/)\n\n```sh\n$ npm i iterator-streams --save\n```\n\n## Usage\n\n```js\nvar iterator = require('iterator-streams');\n```\n\n## API\n\n\u003c!-- add a path or glob pattern for files with code comments to use for docs  --\u003e\n\n### [iterator](index.js#L20)\n\nIterate over a stack of streams piping the results of\neach steram to the next stream in the stack.\n\n**Params**\n\n* `stack` **{Array}**: Array of streams to use.\n* `returns` **{Function}**: Returns a function that will iterator over the given stack of streams.\n\n```js\nvar fs = require('fs');\nvar iterator = require('iterator-streams');\nvar through = require('through2');\n\nvar stack = [\n  through.obj(function (fp, enc, cb) { this.push(fs.readFileSync(fp, 'utf8')); cb(); }),\n  through.obj(function (contents, enc, cb) { this.push(JSON.parse(contents)); cb(); })\n];\nvar readJSON = iterator(stack);\nreadJSON('./package.json')\n  .on('data', console.log);\n```\n\n## Related projects\n\n\u003c!-- add an array of related projects, then un-escape the helper --\u003e\n\n* [event-stream](http://github.com/dominictarr/event-stream): construct pipes of streams of events\n* [iterator-async](https://github.com/doowb/iterator-async): Iterate over a stack of async functions.\n* [iterator-promise](https://github.com/doowb/iterator-promise): Iterator over a stack of functions.\n* [iterator-sync](https://github.com/doowb/iterator-sync): Iterator over a stack of functions.\n* [loader-cache](https://github.com/jonschlinkert/loader-cache): Register loader functions that dynamically read, parse or otherwise transform file contents when the name… [more](https://github.com/jonschlinkert/loader-cache)\n* [through2](https://github.com/rvagg/through2#readme): A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise\n\n## Running tests\n\nInstall dev dependencies:\n\n```sh\n$ npm i -d \u0026\u0026 npm test\n```\n\n## Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/doowb/iterator-streams/issues/new)\n\n## Author\n\n**Brian Woodward**\n\n+ [github/doowb](https://github.com/doowb)\n+ [twitter/doowb](http://twitter.com/doowb)\n\n## License\n\nCopyright © 2015 [Brian Woodward](https://github.com/doowb)\nReleased under the MIT license.\n\n***\n\n_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on June 17, 2015._","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoowb%2Fiterator-streams","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoowb%2Fiterator-streams","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoowb%2Fiterator-streams/lists"}