Skip to content

@epikodelabs/streamix


@epikodelabs/streamix / src/public-api / zip

Function: zip()

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

Defined in: projects/libraries/streamix/src/lib/factories/zip.ts:15

Combine multiple sources into a single atom that emits arrays of the latest values from each input source 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

...{ [K in string | number | symbol]: PipeInput<T[K<K>]> }

The input atoms, streams, or values (including promises) to zip.

Returns

Atom<T>

An atom emitting arrays of values from each input.

Released under the GNU AGPL v3 or later.