Skip to content

@epikodelabs/streamix


@epikodelabs/streamix / zip

Function: zip()

zip<T>(...sources): Stream<T>

Defined in: projects/libraries/streamix/src/lib/streams/zip.ts:13

Combine multiple streams into a single stream that emits arrays of the latest values from each input stream whenever any input emits. Emission occurs only when all inputs have emitted at least once.

Type Parameters

T

T extends readonly unknown[] = any[]

Parameters

sources

...(Stream<T[number]> | MaybePromise<T[number]>)[]

The input streams to zip.

Returns

Stream<T>

A stream emitting arrays of values from each input.

Released under the MIT License.