Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

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

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Latest
class StreamBase
implements Stream<T>
Abstract
import { StreamBase } from "https://deno.land/x/rimbu@1.2.1/stream/custom/index.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, options?: { amount?: number; eq?: Eq<T>; negate?: boolean; }): boolean
containsSlice(source: StreamSource.NonEmpty<T>, options?: { eq?: Eq<T>; amount?: number; }): boolean
count(): number
countElement(value: T, options?: { eq?: Eq<T>; negate?: boolean; }): number
distinctPrevious(options?: { eq?: Eq<T>; negate?: boolean; }): Stream<T>
drop(amount: number): Stream<T>
dropWhile(pred: (value: T, index: number) => boolean, options?: { negate?: boolean; }): Stream<T>
elementAt<O>(index: number, otherwise?: OptLazy<O>): T | O
equals(other: StreamSource<T>, unnamed 1?: { eq?: Eq<T>; negate?: boolean; }): boolean
every(pred: (value: T, index: number) => boolean, options?: { negate?: boolean; }): boolean
filter(pred: (
value: T,
index: number,
halt: () => void,
) => boolean
, options?: { negate?: boolean | undefined; }
): any
filterPure<A extends readonly unknown[]>(options: { pred: (value: T, ...args: A) => boolean; negate?: boolean | undefined; }, ...args: A): any
find<O>(pred: (value: T, index: number) => boolean, options?: { occurrance?: number | undefined; negate?: boolean | undefined; 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
, options?: { state?: TraverseState; }
): void
forEachPure<A extends readonly unknown[]>(f: (value: T, ...args: A) => void, ...args: A): void
groupBy<K, R>(valueToKey: (value: T, index: number) => K, options?: { collector?: Reducer<readonly [K, T], R> | undefined; }): R
indexed(options?: { startIndex?: number; }): Stream<[number, T]>
indexOf(searchValue: T, options?: { occurrance?: number | undefined; eq?: Eq<T> | undefined; negate?: boolean | undefined; }): number | undefined
indexWhere(pred: (value: T, index: number) => boolean, options?: { occurrance?: number; negate?: boolean; }): number | undefined
indicesOf(searchValue: T, options?: { eq?: Eq<T>; negate?: boolean; }): Stream<number>
indicesWhere(pred: (value: T) => boolean, options?: { negate?: 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
partition(pred: (value: T, index: number) => any, options?: { collectorTrue?: any; collectorFalse?: any; }): [any, any]
prepend(value: OptLazy<T>): Stream.NonEmpty<T>
reduce<S extends Reducer.CombineShape<T2>, T2 extends T = T>(shape: S & Reducer.CombineShape<T2>): Reducer.CombineResult<S>
reduceStream<S extends Reducer.CombineShape<T2>, T2 extends T = T>(shape: S & Reducer.CombineShape<T2>): Stream<Reducer.CombineResult<S>>
repeat(amount?: number): Stream<T>
single<O>(otherwise?: OptLazy<O>): T | O
some(pred: (value: T, index: number) => boolean, options?: { negate?: boolean; }): boolean
splitOn<R>(sepElem: T, options?: { eq?: Eq<T> | undefined; negate?: boolean | undefined; collector?: Reducer<T, R> | undefined; }): Stream<R>
splitOnSlice<R>(sepSeq: StreamSource<T>, options?: { eq?: Eq<T> | undefined; collector?: Reducer<T, R> | undefined; }): Stream<R>
splitWhere<R>(pred: (value: T, index: number) => boolean, options?: { negate?: boolean | undefined; collector?: Reducer<T, R> | undefined; }): Stream<R>
stream(): this
take(amount: number): Stream<T>
takeWhile(pred: (value: T, index: number) => boolean, options?: { negate?: boolean; }): Stream<T>
toArray(): T[]
toJSON(): ToJSON<T[], "Stream">
toString(): string
transform<R>(transformer: Transformer<T, R>): Stream<R>
window<R>(windowSize: number, options?: { skipAmount?: number | undefined; collector?: Reducer<T, R> | undefined; }): Stream<R>
withOnly<F extends T>(values: F[]): Stream<F>
without<F extends T>(values: F[]): any