{"id":19621407,"url":"https://github.com/commenthol/streamss-cat","last_synced_at":"2025-10-28T09:22:09.159Z","repository":{"id":25595943,"uuid":"29030683","full_name":"commenthol/streamss-cat","owner":"commenthol","description":"Concatenate stream2 streams to one stream","archived":false,"fork":false,"pushed_at":"2021-10-10T05:37:58.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-09T11:38:30.847Z","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/commenthol.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-01-09T19:02:29.000Z","updated_at":"2021-10-10T05:38:00.000Z","dependencies_parsed_at":"2022-08-19T18:41:59.741Z","dependency_job_id":null,"html_url":"https://github.com/commenthol/streamss-cat","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commenthol%2Fstreamss-cat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commenthol%2Fstreamss-cat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commenthol%2Fstreamss-cat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commenthol%2Fstreamss-cat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/commenthol","download_url":"https://codeload.github.com/commenthol/streamss-cat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240914947,"owners_count":19878069,"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-11-11T11:22:51.091Z","updated_at":"2025-10-28T09:22:04.098Z","avatar_url":"https://github.com/commenthol.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# streamss-cat\n\n\u003e Concatenate stream2 streams to one stream\n\n[![NPM version](https://badge.fury.io/js/streamss-cat.svg)](https://www.npmjs.com/package/streamss-cat/)\n[![Build Status](https://secure.travis-ci.org/commenthol/streamss-cat.svg?branch=master)](https://travis-ci.org/commenthol/streamss-cat)\n\nConcatenate streams to behave like one [Readable][] Stream. This is a pure Stream2 implementation which respects also a very high number of input streams (\u003e1000).\n\nWorks with node v0.8.x and greater.\nFor node v0.8.x the user-land copy [readable-stream][] is used.\nFor all other node versions greater v0.8.x the built-in `stream` module is used.\n\nCredits go to [stream-cat][].\n\n### Examples\n\n**Join two streams:**\n\n```js\nlet Through = require('streamss').Through;\nlet cat = require('streamss-cat');\n\nlet stream1 = new Through();\nlet stream2 = new Through();\n\ncat(stream1, stream2).pipe(process.stdout);\n//cat([stream1, stream2]).pipe(process.stdout); //\u003c alternatively\n\nstream1.end('hello ');\nstream2.end('world');\n\n```\n\n**Join thousand fs streams with allocating the resources on runtime:**\n\n```js\nlet fs = require('fs');\nlet cat = require('../');\nlet streams = [];\n\nfunction fnStream() {\n\treturn fs.createReadStream(__filename);\n}\n\nfor (let i=0; i\u003c1000; i++) {\n\tstreams.push(fnStream);\n}\n\ncat(streams).pipe(process.stdout);\n```\n\n## Methods\n\n### cat(streams)\n\n\u003e Concatenate Streams to a readable stream\n\n**Parameters:**\n\n- `{Readable} streams` - Array of Readable Streams or Array of Functions returning Readable Streams\n\n**Return:**\n\n`{Readable}` A readable stream\n\n\n## Contribution and License Agreement\n\nIf you contribute code to this project, you are implicitly allowing your\ncode to be distributed under the MIT license. You are also implicitly\nverifying that all code is your original work or correctly attributed\nwith the source of its origin and licence.\n\n### npm scripts\n\n* `npm test`      - Run tests\n* `npm run cover` - Run istanbul code coverage (shows code coverage; open `./coverage/lcov-report/index.html` after run)\n* `npm run lint`  - Linting the source\n* `npm run doc`   - Generate documentation from source (open `./doc/index.html` after run)\n\n## License\n\nCopyright (c) 2015 commenthol (MIT License)\n\nSee [LICENSE][] for more info.\n\n[LICENSE]: ./LICENSE\n[stream-cat]: https://github.com/micnews/stream-cat\n[Readable]: http://nodejs.org/api/stream.html#stream_class_stream_readable\n[readable-stream]: https://github.com/isaacs/readable-stream\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommenthol%2Fstreamss-cat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcommenthol%2Fstreamss-cat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommenthol%2Fstreamss-cat/lists"}