{"_id":"@cjser/sindresorhus__merge-streams__v2_3_0","name":"@cjser/sindresorhus__merge-streams__v2_3_0","dist-tags":{"latest":"2.3.0-cjser.2"},"versions":{"2.3.0-cjser.2":{"name":"@cjser/sindresorhus__merge-streams__v2_3_0","version":"2.3.0-cjser.2","description":"Merge multiple streams into a unified stream","license":"MIT","repository":{"type":"git","url":"https://code.moenext.com/3rdeye/cjser.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","require":"./dist-cjser/index.cjs","default":"./index.js"},"sideEffects":false,"engines":{"node":">=18"},"scripts":{"test":"xo && c8 ava && tsd"},"keywords":["merge","stream","streams","readable","passthrough","interleave","interleaved","unify","unified"],"devDependencies":{"@types/node":"^20.8.9","ava":"^6.1.0","c8":"^9.1.0","tempfile":"^5.0.0","tsd":"^0.30.4","typescript":"^5.2.2","xo":"^0.56.0"},"types":"./index.d.ts","main":"./dist-cjser/index.cjs","cjser":{"sourceVersion":"2.3.0","cjserVersion":2,"original":{"name":"@sindresorhus/merge-streams","version":"2.3.0","exports":{"types":"./index.d.ts","default":"./index.js"},"repository":"sindresorhus/merge-streams","files":["index.js","index.d.ts"],"scripts":{"test":"xo && c8 ava && tsd"}}},"_id":"@cjser/sindresorhus__merge-streams__v2_3_0@2.3.0-cjser.2","gitHead":"0168e4aac54a1a9ca6f921419fa5ed9edb53ef4a","_nodeVersion":"20.14.0","_npmVersion":"10.7.0","dist":{"integrity":"sha512-WoLGVWzK38wMTS3oC+30gucnvQq942CNu/NYn3i4F4X0veWTAQ8huRH9N6m36iL0L6TlwL3WArsvjAbqLdgXjw==","shasum":"aecdd8cb0a39170086ad96d859b913a057c77aeb","tarball":"https://registry.npmjs.org/@cjser/sindresorhus__merge-streams__v2_3_0/-/sindresorhus__merge-streams__v2_3_0-2.3.0-cjser.2.tgz","fileCount":6,"unpackedSize":18197,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEprj1xudyUjnczYArFyr2vvsh23zSLf8gF5xTA8zIBDAiEAkCeGTzjyEzBbYwMKGua4i/N81wmYVxZYfTYoicn6pRI="}]},"_npmUser":{"name":"nanahira","email":"nanahira@momobako.com"},"directories":{},"maintainers":[{"name":"nanahira","email":"nanahira@momobako.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sindresorhus__merge-streams__v2_3_0_2.3.0-cjser.2_1778130992431_0.7295388942328997"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-07T05:16:32.295Z","2.3.0-cjser.2":"2026-05-07T05:16:32.573Z","modified":"2026-05-07T05:16:32.831Z"},"maintainers":[{"name":"nanahira","email":"nanahira@momobako.com"}],"description":"Merge multiple streams into a unified stream","keywords":["merge","stream","streams","readable","passthrough","interleave","interleaved","unify","unified"],"repository":{"type":"git","url":"https://code.moenext.com/3rdeye/cjser.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"license":"MIT","readme":"# merge-streams\n\n> Merge multiple streams into a unified stream\n\n## Install\n\n```sh\nnpm install @sindresorhus/merge-streams\n```\n\n## Usage\n\n```js\nimport mergeStreams from '@sindresorhus/merge-streams';\n\nconst stream = mergeStreams([streamA, streamB]);\n\nfor await (const chunk of stream) {\n\tconsole.log(chunk);\n\t//=> 'A1'\n\t//=> 'B1'\n\t//=> 'A2'\n\t//=> 'B2'\n}\n```\n\n## API\n\n### `mergeStreams(streams: stream.Readable[]): MergedStream`\n\nMerges an array of [readable streams](https://nodejs.org/api/stream.html#readable-streams) and returns a new readable stream that emits data from the individual streams as it arrives.\n\nIf you provide an empty array, it returns an already-ended stream.\n\n#### `MergedStream`\n\n_Type_: `stream.Readable`\n\nA single stream combining the output of multiple streams.\n\n##### `MergedStream.add(stream: stream.Readable): void`\n\nPipe a new readable stream.\n\nThrows if `MergedStream` has already ended.\n\n##### `MergedStream.remove(stream: stream.Readable): boolean`\n\nUnpipe a stream previously added using either [`mergeStreams(streams)`](#mergestreamsstreams-streamreadable-mergedstream) or [`MergedStream.add(stream)`](#mergedstreamaddstream-streamreadable-void).\n\nReturns `false` if the stream was not previously added, or if it was already removed by `MergedStream.remove(stream)`.\n\nThe removed stream is not automatically ended.\n\n## cjser\n\nThis package is a CommonJS-compatible build generated by cjser for projects that still need `require()` support. The source version matches the original npm package version, with a cjser prerelease suffix for this generated build.\nOriginal repository: https://github.com/sindresorhus/merge-streams\n","readmeFilename":"readme.md","_rev":"1-832ce0fff816b84a963ea999ab1557e3"}