Skip to main content

package @rimbu/stream/custom

The @rimbu/stream/custom entry exposes custom constructors, fast iterator helpers and internal stream implementations that underlie the main Stream API in @rimbu/stream. It is intended for advanced scenarios where you need to build specialized stream sources or integrate with the fast‑iterator infrastructure; for most use cases the main @rimbu/stream entry is sufficient.

Interfaces

NameDescription
StreamConstructorsAn interface describing all factory functions used to create Stream instances. Implementations of this interface are exposed via the global Stream value and the @rimbu/stream/custom sub-package.

Classes

NameDescription
AlwaysIteratorundocumented
AppendIteratorundocumented
ArrayIterator_2undocumented
ArrayReverseIteratorundocumented
CollectIteratorundocumented
ConcatIteratorundocumented
DropIteratorundocumented
DropWhileIteratorundocumented
FastIteratorBaseA base class for FastIterator instances that implements the standard next method in terms of the abstract fastNext method.
FilterApplyIteratorundocumented
FilterIteratorundocumented
FilterPureIteratorundocumented
IndexedIteratorundocumented
MapApplyIteratorundocumented
MapIterator_2undocumented
MapPureIteratorundocumented
PrependIteratorundocumented
RandomIntIteratorundocumented
RandomIteratorundocumented
RangeDownIteratorundocumented
RangeUpIteratorundocumented
ReducerFastIteratorundocumented
RepeatIteratorundocumented
StreamBaseA reusable base implementation for Stream that provides all high-level operations in terms of a FastIterator returned from [Symbol.iterator].
Custom stream implementations in @rimbu/stream/custom extend this class.
TakeIteratorundocumented
TransformerFastIteratorundocumented
UnfoldIteratorundocumented
ZipAllWithItereratorundocumented
ZipWithIteratorundocumented

Functions

isEmptyStreamSourceInstance

Returns true if the given source is a StreamSource that is known to be empty. If this function returns false, the source may still be empty; it is simply not known.

Definition

export declare function isEmptyStreamSourceInstance(source: StreamSource<any>): boolean;

Parameters

NameTypeDescription
sourceStreamSource<any>a potential stream source

isFastIterator

Returns true if the given iterator implements the FastIterator interface.

Definition

export declare function isFastIterator<T>(iterator: Iterator<T>): iterator is FastIterator<T>;

Type parameters
NameDescription
T

Parameters

NameTypeDescription
iteratorIterator<T>the iterator instance to test

Constants

NameDescription
emptyFastIteratorA FastIterator that is already exhausted and never yields values. Its fastNext method always returns the provided fallback value.
fixedDoneIteratorResultA frozen IteratorResult instance representing the completed iterator state. This value is reused by several fast iterator implementations to avoid allocations.
fromStreamSourceConverts any StreamSource into a concrete Stream implementation.
StreamConstructorsImplDefault implementation of the StreamConstructors interface. This instance backs the exported Stream value.