Skip to main content

abstract class StreamBase<T>

undocumented

Implements: Stream<T>

Type parameters

NameDescription
Tundocumented

Methods

[Symbol.iterator]

undocumented

Definition

abstract [Symbol.iterator](): FastIterator<T>;

Overrides

FastIterable.[Symbol.iterator]

append

undocumented

Definition

append(value: OptLazy<T>): Stream.NonEmpty<T>;

Parameters

NameTypeDescription
valueOptLazy<T>

Overrides

Stream.append

asNormal

undocumented

Definition

asNormal(): Stream<T>;

assumeNonEmpty

undocumented

Definition

assumeNonEmpty(): Stream.NonEmpty<T>;

Overrides

Stream.assumeNonEmpty

collect

undocumented

Definition

collect<R>(collectFun: CollectFun<T, R>): Stream<R>;

Type parameters

NameDescription
R

Parameters

NameTypeDescription
collectFunCollectFun<T, R>

Overrides

Stream.collect

concat

undocumented

Definition

concat(...others: ArrayNonEmpty<StreamSource<T>>): Stream.NonEmpty<T>;

Parameters

NameTypeDescription
othersArrayNonEmpty<StreamSource<T>>

Overrides

Stream.concat

contains

undocumented

Definition

contains(searchValue: T, options?: {
    amount?: number;
    eq?: Eq<T>;
    negate?: boolean;
  }): boolean;

Parameters

NameTypeDescription
searchValueT
options{
    amount?: number;
    eq?: Eq<T>;
    negate?: boolean;
  }

Overrides

Stream.contains

containsSlice

undocumented

Definition

containsSlice(source: StreamSource.NonEmpty<T>, options?: {
    eq?: Eq<T>;
    amount?: number;
  }): boolean;

Parameters

NameTypeDescription
sourceStreamSource.NonEmpty<T>
options{
    eq?: Eq<T>;
    amount?: number;
  }

Overrides

Stream.containsSlice

count

undocumented

Definition

count(): number;

Overrides

Stream.count

countElement

undocumented

Definition

countElement(value: T, options?: {
    eq?: Eq<T>;
    negate?: boolean;
  }): number;

Parameters

NameTypeDescription
valueT
options{
    eq?: Eq<T>;
    negate?: boolean;
  }

Overrides

Stream.countElement

distinctPrevious

undocumented

Definition

distinctPrevious(options?: {
    eq?: Eq<T>;
    negate?: boolean;
  }): Stream<T>;

Parameters

NameTypeDescription
options{
    eq?: Eq<T>;
    negate?: boolean;
  }

Overrides

Stream.distinctPrevious

drop

undocumented

Definition

drop(amount: number): Stream<T>;

Parameters

NameTypeDescription
amountnumber

Overrides

Stream.drop

dropWhile

undocumented

Definition

dropWhile(pred: (value: T, index: number) => boolean, options?: {
    negate?: boolean;
  }): Stream<T>;

Parameters

NameTypeDescription
pred(value: T, index: number) => boolean
options{
    negate?: boolean;
  }

Overrides

Stream.dropWhile

elementAt

undocumented

Definition

elementAt<O>(index: number, otherwise?: OptLazy<O>): T | O;

Type parameters

NameDescription
O

Parameters

NameTypeDescription
indexnumber
otherwiseOptLazy<O>

Overrides

Stream.elementAt

equals

undocumented

Definition

equals(other: StreamSource<T>, { eq, negate }?: {
    eq?: Eq<T>;
    negate?: boolean;
  }): boolean;

Parameters

NameTypeDescription
otherStreamSource<T>
{ eq, negate }{
    eq?: Eq<T>;
    negate?: boolean;
  }

Overrides

Stream.equals

every

undocumented

Definition

every(pred: (value: T, index: number) => boolean, options?: {
    negate?: boolean;
  }): boolean;

Parameters

NameTypeDescription
pred(value: T, index: number) => boolean
options{
    negate?: boolean;
  }

Overrides

Stream.every

filter

undocumented

Definition

filter(pred: (value: T, index: number, halt: () => void) => boolean, options?: {
    negate?: boolean | undefined;
  }): any;

Parameters

NameTypeDescription
pred(value: T, index: number, halt: () => void) => boolean
options{
    negate?: boolean | undefined;
  }

Overrides

Stream.filter

filterPure

undocumented

Definition

filterPure<A extends readonly unknown[]>(options: {
    pred: (value: T, ...args: A) => boolean;
    negate?: boolean | undefined;
  }, ...args: A): any;

Type parameters

NameConstraintsDescription
Areadonly unknown[]

Parameters

NameTypeDescription
options{
    pred: (value: T, ...args: A) => boolean;
    negate?: boolean | undefined;
  }
argsA

Overrides

Stream.filterPure

find

undocumented

Definition

find<O>(pred: (value: T, index: number) => boolean, options?: {
    occurrance?: number | undefined;
    negate?: boolean | undefined;
    otherwise?: OptLazy<O>;
  }): T | O;

Type parameters

NameDescription
O

Parameters

NameTypeDescription
pred(value: T, index: number) => boolean
options{
    occurrance?: number | undefined;
    negate?: boolean | undefined;
    otherwise?: OptLazy<O>;
  }

Overrides

Stream.find

first

undocumented

Definition

first<O>(otherwise?: OptLazy<O>): T | O;

Type parameters

NameDescription
O

Parameters

NameTypeDescription
otherwiseOptLazy<O>

Overrides

Stream.first

flatMap

undocumented

Definition

flatMap<T2>(flatMapFun: (value: T, index: number, halt: () => void) => StreamSource<T2>): Stream<T2>;

Type parameters

NameDescription
T2

Parameters

NameTypeDescription
flatMapFun(value: T, index: number, halt: () => void) => StreamSource<T2>

Overrides

Stream.flatMap

flatZip

undocumented

Definition

flatZip<T2>(flatMapFun: (value: T, index: number, halt: () => void) => StreamSource<T2>): Stream<[T, T2]>;

Type parameters

NameDescription
T2

Parameters

NameTypeDescription
flatMapFun(value: T, index: number, halt: () => void) => StreamSource<T2>

Overrides

Stream.flatZip

fold

undocumented

Definition

fold<R>(init: OptLazy<R>, next: (current: R, value: T, index: number, halt: () => void) => R): R;

Type parameters

NameDescription
R

Parameters

NameTypeDescription
initOptLazy<R>
next(current: R, value: T, index: number, halt: () => void) => R

Overrides

Stream.fold

foldStream

undocumented

Definition

foldStream<R>(init: OptLazy<R>, next: (current: R, value: T, index: number, halt: () => void) => R): Stream<R>;

Type parameters

NameDescription
R

Parameters

NameTypeDescription
initOptLazy<R>
next(current: R, value: T, index: number, halt: () => void) => R

Overrides

Stream.foldStream

forEach

undocumented

Definition

forEach(f: (value: T, index: number, halt: () => void) => void, options?: {
    state?: TraverseState;
  }): void;

Parameters

NameTypeDescription
f(value: T, index: number, halt: () => void) => void
options{
    state?: TraverseState;
  }

Overrides

Stream.forEach

forEachPure

undocumented

Definition

forEachPure<A extends readonly unknown[]>(f: (value: T, ...args: A) => void, ...args: A): void;

Type parameters

NameConstraintsDescription
Areadonly unknown[]

Parameters

NameTypeDescription
f(value: T, ...args: A) => void
argsA

Overrides

Stream.forEachPure

groupBy

undocumented

Definition

groupBy<K, R>(valueToKey: (value: T, index: number) => K, options?: {
    collector?: Reducer<readonly [K, T], R> | undefined;
  }): R;

Type parameters

NameDescription
K
R

Parameters

NameTypeDescription
valueToKey(value: T, index: number) => K
options{
    collector?: Reducer<readonly [K, T], R> | undefined;
  }

Overrides

Stream.groupBy

indexed

undocumented

Definition

indexed(options?: {
    startIndex?: number;
  }): Stream<[number, T]>;

Parameters

NameTypeDescription
options{
    startIndex?: number;
  }

Overrides

Stream.indexed

indexOf

undocumented

Definition

indexOf(searchValue: T, options?: {
    occurrance?: number | undefined;
    eq?: Eq<T> | undefined;
    negate?: boolean | undefined;
  }): number | undefined;

Parameters

NameTypeDescription
searchValueT
options{
    occurrance?: number | undefined;
    eq?: Eq<T> | undefined;
    negate?: boolean | undefined;
  }

Overrides

Stream.indexOf

indexWhere

undocumented

Definition

indexWhere(pred: (value: T, index: number) => boolean, options?: {
    occurrance?: number;
    negate?: boolean;
  }): number | undefined;

Parameters

NameTypeDescription
pred(value: T, index: number) => boolean
options{
    occurrance?: number;
    negate?: boolean;
  }

Overrides

Stream.indexWhere

indicesOf

undocumented

Definition

indicesOf(searchValue: T, options?: {
    eq?: Eq<T>;
    negate?: boolean;
  }): Stream<number>;

Parameters

NameTypeDescription
searchValueT
options{
    eq?: Eq<T>;
    negate?: boolean;
  }

Overrides

Stream.indicesOf

indicesWhere

undocumented

Definition

indicesWhere(pred: (value: T) => boolean, options?: {
    negate?: boolean;
  }): Stream<number>;

Parameters

NameTypeDescription
pred(value: T) => boolean
options{
    negate?: boolean;
  }

Overrides

Stream.indicesWhere

intersperse

undocumented

Definition

intersperse(sep: StreamSource<T>): Stream<T>;

Parameters

NameTypeDescription
sepStreamSource<T>

Overrides

Stream.intersperse

join

undocumented

Definition

join({ sep, start, end, valueToString, ifEmpty, }?: {
    sep?: string | undefined;
    start?: string | undefined;
    end?: string | undefined;
    valueToString?: StringConstructor | undefined;
    ifEmpty?: undefined;
  }): string;

Parameters

NameTypeDescription
{ sep, start, end, valueToString, ifEmpty, }{
    sep?: string | undefined;
    start?: string | undefined;
    end?: string | undefined;
    valueToString?: StringConstructor | undefined;
    ifEmpty?: undefined;
  }

Overrides

Stream.join

last

undocumented

Definition

last<O>(otherwise?: OptLazy<O>): T | O;

Type parameters

NameDescription
O

Parameters

NameTypeDescription
otherwiseOptLazy<O>

Overrides

Stream.last

map

undocumented

Definition

map<T2>(mapFun: (value: T, index: number) => T2): Stream<T2>;

Type parameters

NameDescription
T2

Parameters

NameTypeDescription
mapFun(value: T, index: number) => T2

Overrides

Stream.map

mapPure

undocumented

Definition

mapPure<T2, A extends readonly unknown[]>(mapFun: (value: T, ...args: A) => T2, ...args: A): Stream<T2>;

Type parameters

NameConstraintsDescription
T2
Areadonly unknown[]

Parameters

NameTypeDescription
mapFun(value: T, ...args: A) => T2
argsA

Overrides

Stream.mapPure

max

undocumented

Definition

max<O>(otherwise?: OptLazy<O>): T | O;

Type parameters

NameDescription
O

Parameters

NameTypeDescription
otherwiseOptLazy<O>

Overrides

Stream.max

maxBy

undocumented

Definition

maxBy<O>(compare: (v1: T, v2: T) => number, otherwise?: OptLazy<O>): T | O;

Type parameters

NameDescription
O

Parameters

NameTypeDescription
compare(v1: T, v2: T) => number
otherwiseOptLazy<O>

Overrides

Stream.maxBy

min

undocumented

Definition

min<O>(otherwise?: OptLazy<O>): T | O;

Type parameters

NameDescription
O

Parameters

NameTypeDescription
otherwiseOptLazy<O>

Overrides

Stream.min

minBy

undocumented

Definition

minBy<O>(compare: (v1: T, v2: T) => number, otherwise?: OptLazy<O>): T | O;

Type parameters

NameDescription
O

Parameters

NameTypeDescription
compare(v1: T, v2: T) => number
otherwiseOptLazy<O>

Overrides

Stream.minBy

mkGroup

undocumented

Definition

mkGroup({ sep, start, end, }?: {
    sep?: StreamSource<T>;
    start?: StreamSource<T>;
    end?: StreamSource<T>;
  }): any;

Parameters

NameTypeDescription
{ sep, start, end, }{
    sep?: StreamSource<T>;
    start?: StreamSource<T>;
    end?: StreamSource<T>;
  }

Overrides

Stream.mkGroup

partition

undocumented

Definition

partition(pred: (value: T, index: number) => any, options?: {
    collectorTrue?: any;
    collectorFalse?: any;
  }): [any, any];

Parameters

NameTypeDescription
pred(value: T, index: number) => any
options{
    collectorTrue?: any;
    collectorFalse?: any;
  }

Overrides

Stream.partition

prepend

undocumented

Definition

prepend(value: OptLazy<T>): Stream.NonEmpty<T>;

Parameters

NameTypeDescription
valueOptLazy<T>

Overrides

Stream.prepend

reduce

undocumented

Definition

reduce<const S extends Reducer.CombineShape<T2>, T2 extends T = T>(shape: S & Reducer.CombineShape<T2>): Reducer.CombineResult<S>;

Type parameters

NameConstraintsDefaultDescription
SReducer.CombineShape<T2>
T2TT

Parameters

NameTypeDescription
shapeS & Reducer.CombineShape<T2>

Overrides

Stream.reduce

reduceStream

undocumented

Definition

reduceStream<const S extends Reducer.CombineShape<T2>, T2 extends T = T>(shape: S & Reducer.CombineShape<T2>): Stream<Reducer.CombineResult<S>>;

Type parameters

NameConstraintsDefaultDescription
SReducer.CombineShape<T2>
T2TT

Parameters

NameTypeDescription
shapeS & Reducer.CombineShape<T2>

Overrides

Stream.reduceStream

repeat

undocumented

Definition

repeat(amount?: number): Stream<T>;

Parameters

NameTypeDescription
amountnumber

Overrides

Stream.repeat

single

undocumented

Definition

single<O>(otherwise?: OptLazy<O>): T | O;

Type parameters

NameDescription
O

Parameters

NameTypeDescription
otherwiseOptLazy<O>

Overrides

Stream.single

some

undocumented

Definition

some(pred: (value: T, index: number) => boolean, options?: {
    negate?: boolean;
  }): boolean;

Parameters

NameTypeDescription
pred(value: T, index: number) => boolean
options{
    negate?: boolean;
  }

Overrides

Stream.some

splitOn

undocumented

Definition

splitOn<R>(sepElem: T, options?: {
    eq?: Eq<T> | undefined;
    negate?: boolean | undefined;
    collector?: Reducer<T, R> | undefined;
  }): Stream<R>;

Type parameters

NameDescription
R

Parameters

NameTypeDescription
sepElemT
options{
    eq?: Eq<T> | undefined;
    negate?: boolean | undefined;
    collector?: Reducer<T, R> | undefined;
  }

Overrides

Stream.splitOn

splitOnSlice

undocumented

Definition

splitOnSlice<R>(sepSeq: StreamSource<T>, options?: {
    eq?: Eq<T> | undefined;
    collector?: Reducer<T, R> | undefined;
  }): Stream<R>;

Type parameters

NameDescription
R

Parameters

NameTypeDescription
sepSeqStreamSource<T>
options{
    eq?: Eq<T> | undefined;
    collector?: Reducer<T, R> | undefined;
  }

Overrides

Stream.splitOnSlice

splitWhere

undocumented

Definition

splitWhere<R>(pred: (value: T, index: number) => boolean, options?: {
    negate?: boolean | undefined;
    collector?: Reducer<T, R> | undefined;
  }): Stream<R>;

Type parameters

NameDescription
R

Parameters

NameTypeDescription
pred(value: T, index: number) => boolean
options{
    negate?: boolean | undefined;
    collector?: Reducer<T, R> | undefined;
  }

Overrides

Stream.splitWhere

stream

undocumented

Definition

stream(): this;

Overrides

Stream.stream

take

undocumented

Definition

take(amount: number): Stream<T>;

Parameters

NameTypeDescription
amountnumber

Overrides

Stream.take

takeWhile

undocumented

Definition

takeWhile(pred: (value: T, index: number) => boolean, options?: {
    negate?: boolean;
  }): Stream<T>;

Parameters

NameTypeDescription
pred(value: T, index: number) => boolean
options{
    negate?: boolean;
  }

Overrides

Stream.takeWhile

toArray

undocumented

Definition

toArray(): T[];

Overrides

Stream.toArray

toJSON

undocumented

Definition

toJSON(): ToJSON<T[], 'Stream'>;

Overrides

Stream.toJSON

toString

undocumented

Definition

toString(): string;

Overrides

Stream.toString

transform

undocumented

Definition

transform<R>(transformer: Transformer<T, R>): Stream<R>;

Type parameters

NameDescription
R

Parameters

NameTypeDescription
transformerTransformer<T, R>

Overrides

Stream.transform

window

undocumented

Definition

window<R>(windowSize: number, options?: {
    skipAmount?: number | undefined;
    collector?: Reducer<T, R> | undefined;
  }): Stream<R>;

Type parameters

NameDescription
R

Parameters

NameTypeDescription
windowSizenumber
options{
    skipAmount?: number | undefined;
    collector?: Reducer<T, R> | undefined;
  }

Overrides

Stream.window

withOnly

undocumented

Definition

withOnly<F extends T>(values: F[]): Stream<F>;

Type parameters

NameConstraintsDescription
FT

Parameters

NameTypeDescription
valuesF[]

Overrides

Stream.withOnly

without

undocumented

Definition

without<F extends T>(values: F[]): any;

Type parameters

NameConstraintsDescription
FT

Parameters

NameTypeDescription
valuesF[]

Overrides

Stream.without