Skip to content

@epikodelabs/streamix


@epikodelabs/streamix / bufferUntil

Function: bufferUntil()

bufferUntil<T, N>(notifier): Operator<T, T[]>

Defined in: projects/libraries/streamix/src/lib/operators/bufferUntil.ts:20

Buffers values from the source iterator until the notifier emits. Once the notifier emits, the buffered values are flushed as an array.

Type Parameters

T

T = any

Type of values emitted by the source iterator.

N

N = any

Type of values emitted by the notifier stream (ignored).

Parameters

notifier

Stream<N>

Stream whose emissions trigger buffer flush.

Returns

Operator<T, T[]>

A Streamix operator that collects values into arrays and emits them whenever the notifier emits or the source completes.

Released under the MIT License.