{"_id":"@depup/sindresorhus__merge-streams","name":"@depup/sindresorhus__merge-streams","dist-tags":{"latest":"4.0.0-depup.0"},"versions":{"4.0.0-depup.0":{"name":"@depup/sindresorhus__merge-streams","version":"4.0.0-depup.0","description":"[DepUp] Merge multiple streams into a unified stream","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/merge-streams.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","default":"./index.js"},"sideEffects":false,"engines":{"node":">=18"},"scripts":{"test":"xo && c8 ava && tsd"},"keywords":["depup","dependency-bumped","updated-deps","@sindresorhus/merge-streams","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.31.0","typescript":"^5.2.2","xo":"^0.58.0"},"depup":{"changes":{},"depsUpdated":0,"originalPackage":"@sindresorhus/merge-streams","originalVersion":"4.0.0","processedAt":"2026-03-17T16:34:08.253Z","smokeTest":"passed"},"gitHead":"4696d3349a039de4b13745770d87bbf7fd3d5b12","types":"./index.d.ts","_id":"@depup/sindresorhus__merge-streams@4.0.0-depup.0","bugs":{"url":"https://github.com/sindresorhus/merge-streams/issues"},"homepage":"https://github.com/sindresorhus/merge-streams#readme","_nodeVersion":"24.14.0","_npmVersion":"11.9.0","dist":{"integrity":"sha512-POrz8Qw2kpEiwEJ7JLHB7hNE/rngX032jls3fTkRT5pc46PBgs9p7qTsug0rBOtLEXCuBNSepN0Fm8bui/5+bQ==","shasum":"ab2b10d97cf698631ab9067007148482a48f6133","tarball":"https://registry.npmjs.org/@depup/sindresorhus__merge-streams/-/sindresorhus__merge-streams-4.0.0-depup.0.tgz","fileCount":7,"unpackedSize":12672,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHCnjlBKf6gRdsrjV8u3odFYYpsW2KXjiT+01UnC1FxQAiEA8Tl8COd6i+yEu/xhEpVLvYP7FhOKXfc6BL8miba8HLI="}]},"_npmUser":{"name":"chiefmikey","email":"wolfemikl@gmail.com"},"directories":{},"maintainers":[{"name":"chiefmikey","email":"wolfemikl@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sindresorhus__merge-streams_4.0.0-depup.0_1773765249989_0.7947991804747156"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-17T16:34:09.896Z","4.0.0-depup.0":"2026-03-17T16:34:10.172Z","modified":"2026-03-17T16:34:10.391Z"},"maintainers":[{"name":"chiefmikey","email":"wolfemikl@gmail.com"}],"description":"[DepUp] Merge multiple streams into a unified stream","homepage":"https://github.com/sindresorhus/merge-streams#readme","keywords":["depup","dependency-bumped","updated-deps","@sindresorhus/merge-streams","merge","stream","streams","readable","passthrough","interleave","interleaved","unify","unified"],"repository":{"type":"git","url":"git+https://github.com/sindresorhus/merge-streams.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"bugs":{"url":"https://github.com/sindresorhus/merge-streams/issues"},"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, the stream remains open but can be [manually ended](https://nodejs.org/api/stream.html#writableendchunk-encoding-callback).\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): Promise<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","readmeFilename":"readme.md","_rev":"1-a2794e85d4b8c346ef064f87da29fd27"}