Skip to content

@epikodelabs/streamix


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

Function: atomFromIterator()

atomFromIterator<T>(source, options?): Atom<T>

Defined in: projects/libraries/streamix/src/lib/atoms/atom.ts:854

Creates a readable atom backed by an async iterable.

The source starts when the first subscriber attaches and is closed when the atom is disposed. Values yielded by the iterable become atom emissions.

Type Parameters

T

T

Parameters

source

AsyncIterable<T>

options?

AtomFromIteratorOptions<T>

Returns

Atom<T>

Released under the GNU AGPL v3 or later.