Skip to main content
Module

x/rimbu/stream/custom/stream-custom.ts>StreamBase

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
class StreamBase
implements Stream<T>
Abstract
import { StreamBase } from "https://deno.land/x/rimbu@0.13.1/stream/custom/stream-custom.ts";

Methods

append(value: OptLazy<T>): Stream.NonEmpty<T>
assumeNonEmpty(): Stream.NonEmpty<T>
collect<R>(collectFun: CollectFun<T, R>): Stream<R>
concat(...others: ArrayNonEmpty<StreamSource<T>>): Stream.NonEmpty<T>
contains(
searchValue: T,
amount?,
eq?: Eq<T>,
): boolean
containsSlice(source: StreamSource.NonEmpty<T>, eq?): boolean
count(): number
countElement(value: T, eq?: Eq<T>): number
countNotElement(value: T, eq?: Eq<T>): number
drop(amount: number): Stream<T>
dropWhile(pred: (value: T, index: number) => boolean): Stream<T>
elementAt<O>(index: number, otherwise?: OptLazy<O>): T | O
equals(other: StreamSource<T>, eq?: Eq<T>): boolean
every(pred: (value: T, index: number) => boolean): boolean
filter(pred: (
value: T,
index: number,
halt: () => void,
) => boolean
): Stream<T>
filterNot(pred: (
value: T,
index: number,
halt: () => void,
) => boolean
): Stream<T>
filterNotPure<A extends readonly unknown[]>(pred: (value: T, ...args: A) => boolean, ...args: A): Stream<T>
filterPure<A extends readonly unknown[]>(pred: (value: T, ...args: A) => boolean, ...args: A): Stream<T>
find<O>(
pred: (value: T, index: number) => boolean,
occurrance?,
otherwise?: OptLazy<O>,
): T | O
first<O>(otherwise?: OptLazy<O>): T | O
flatMap<T2>(flatMapFun: (
value: T,
index: number,
halt: () => void,
) => StreamSource<T2>
): Stream<T2>
flatZip<T2>(flatMapFun: (
value: T,
index: number,
halt: () => void,
) => StreamSource<T2>
): Stream<[T, T2]>
fold<R>(init: OptLazy<R>, next: (
current: R,
value: T,
index: number,
halt: () => void,
) => R
): R
foldStream<R>(init: OptLazy<R>, next: (
current: R,
value: T,
index: number,
halt: () => void,
) => R
): Stream<R>
forEach(f: (
value: T,
index: number,
halt: () => void,
) => void
, state?
): void
forEachPure<A extends readonly unknown[]>(f: (value: T, ...args: A) => void, ...args: A): void
indexed(startIndex?): Stream<[number, T]>
indexOf(
searchValue: T,
occurrance?,
eq?: Eq<T>,
): number | undefined
indexWhere(pred: (value: T, index: number) => boolean, occurrance?): number | undefined
indicesOf(searchValue: T, eq?: Eq<T>): Stream<number>
indicesWhere(pred: (value: T) => boolean): Stream<number>
join(unnamed 0?): string
last<O>(otherwise?: OptLazy<O>): T | O
map<T2>(mapFun: (value: T, index: number) => T2): Stream<T2>
mapPure<T2, A extends readonly unknown[]>(mapFun: (value: T, ...args: A) => T2, ...args: A): Stream<T2>
max<O>(otherwise?: OptLazy<O>): T | O
maxBy<O>(compare: (v1: T, v2: T) => number, otherwise?: OptLazy<O>): T | O
min<O>(otherwise?: OptLazy<O>): T | O
minBy<O>(compare: (v1: T, v2: T) => number, otherwise?: OptLazy<O>): T | O
mkGroup(unnamed 0?): any
prepend(value: OptLazy<T>): Stream.NonEmpty<T>
reduce<O>(reducer: Reducer<T, O>): O
reduceAll(...reducers: any): any
reduceAllStream(...reducers: any): any
reduceStream<O>(reducer: Reducer<T, O>): Stream<O>
repeat(amount?: number): Stream<T>
single<O>(otherwise?: OptLazy<O>): T | O
some(pred: (value: T, index: number) => boolean): boolean
splitOn(sepElem: T, eq?: Eq<T>): Stream<T[]>
splitWhere(pred: (value: T, index: number) => boolean): Stream<T[]>
stream(): this
take(amount: number): Stream<T>
takeWhile(pred: (value: T, index: number) => boolean): Stream<T>
toArray(): T[]
toJSON(): ToJSON<T[], "Stream">
toString(): string
transform<R>(transformer: Transformer<T, R>): Stream<R>
window<R>(
windowSize: number,
skipAmount?,
collector?: Reducer<T, R>,
): Stream<R>