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

x/rimbu/stream/async-custom/async-stream-custom.ts>AsyncStreamBase

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

Methods

append(value: AsyncOptLazy<T>): AsyncStream.NonEmpty<T>
assumeNonEmpty(): AsyncStream.NonEmpty<T>
asyncStream(): this
collect<R>(collectFun: AsyncCollectFun<T, R>): AsyncStream<R>
contains(searchValue: T, options?: { amount?: number; eq?: Eq<T>; negate?: boolean; }): Promise<boolean>
containsSlice(source: AsyncStreamSource.NonEmpty<T>, options?: { eq?: Eq<T>; negate?: boolean; }): Promise<boolean>
count(): Promise<number>
countElement(value: T, options?: { eq?: Eq<T>; negate?: boolean; }): Promise<number>
distinctPrevious(options?: { eq?: Eq<T>; negate?: boolean; }): AsyncStream<T>
drop(amount: number): AsyncStream<T>
dropWhile(pred: (value: T, index: number) => MaybePromise<boolean>, options?: { negate?: boolean; }): AsyncStream<T>
elementAt<O>(index: number, otherwise?: AsyncOptLazy<O>): Promise<T | O>
equals(other: AsyncStreamSource<T>, options?: { eq?: Eq<T>; negate?: boolean; }): Promise<boolean>
every(pred: (value: T, index: number) => MaybePromise<boolean>, options?: { negate?: boolean; }): Promise<boolean>
filter(pred: (
value: T,
index: number,
halt: () => void,
) => MaybePromise<boolean>
, options?: { negate?: boolean; }
): AsyncStream<T>
filterPure<A extends readonly unknown[]>(options: { pred: (value: T, ...args: A) => MaybePromise<boolean>; negate?: boolean; }, ...args: A): AsyncStream<T>
find<O>(pred: (value: T, index: number) => MaybePromise<boolean>, options?: { occurrance?: number; negate?: boolean; otherwise?: AsyncOptLazy<O>; }): Promise<T | O>
first<O>(otherwise?: AsyncOptLazy<O>): Promise<T | O>
flatMap<T2>(flatMapFun: (
value: T,
index: number,
halt: () => void,
) => AsyncStreamSource<T2>
): AsyncStream<T2>
flatZip<T2>(flatMapFun: (
value: T,
index: number,
halt: () => void,
) => AsyncStreamSource<T2>
): AsyncStream<[T, T2]>
fold<R>(init: AsyncOptLazy<R>, next: (
current: R,
value: T,
index: number,
halt: () => void,
) => MaybePromise<R>
): Promise<R>
foldStream<R>(init: AsyncOptLazy<R>, next: (
current: R,
value: T,
index: number,
halt: () => void,
) => MaybePromise<R>
): AsyncStream<R>
forEach(f: (
value: T,
index: number,
halt: () => void,
) => MaybePromise<void>
, options?: { state?: TraverseState; }
): Promise<void>
forEachPure<A extends readonly unknown[]>(f: (value: T, ...args: A) => MaybePromise<void>, ...args: A): Promise<void>
indexed(options?: { startIndex?: number; }): AsyncStream<[number, T]>
indexOf(searchValue: T, options?: { occurrance?: number | undefined; eq?: Eq<T> | undefined; negate?: boolean | undefined; }): Promise<number | undefined>
indexWhere(pred: (value: T, index: number) => MaybePromise<boolean>, options?: { occurrance?: number; negate?: boolean; }): Promise<number | undefined>
indicesOf(searchValue: T, options?: { eq?: Eq<T>; negate?: boolean; }): AsyncStream<number>
indicesWhere(pred: (value: T) => MaybePromise<boolean>, options?: { negate?: boolean; }): AsyncStream<number>
join(unnamed 0?): Promise<string>
last<O>(otherwise?: AsyncOptLazy<O>): Promise<T | O>
map<T2>(mapFun: (value: T, index: number) => MaybePromise<T2>): AsyncStream<T2>
mapPure<T2, A extends readonly unknown[]>(mapFun: (value: T, ...args: A) => MaybePromise<T2>, ...args: A): AsyncStream<T2>
max<O>(otherwise?: AsyncOptLazy<O>): Promise<T | O>
maxBy<O>(compare: (v1: T, v2: T) => number, otherwise?: AsyncOptLazy<O>): Promise<T | O>
min<O>(otherwise?: AsyncOptLazy<O>): Promise<T | O>
minBy<O>(compare: (v1: T, v2: T) => number, otherwise?: AsyncOptLazy<O>): Promise<T | O>
mkGroup(unnamed 0?): any
prepend(value: AsyncOptLazy<T>): AsyncStream.NonEmpty<T>
reduce<S extends AsyncReducer.CombineShape<T>>(shape: S & AsyncReducer.CombineShape<T>): Promise<AsyncReducer.CombineResult<S>>
reduceStream<S extends AsyncReducer.CombineShape<T>>(shape: S & AsyncReducer.CombineShape<T>): AsyncStream<AsyncReducer.CombineResult<S>>
repeat(amount?: number): AsyncStream<T>
single<O>(otherwise?: AsyncOptLazy<O>): Promise<T | O>
some(pred: (value: T, index: number) => MaybePromise<boolean>, options?: { negate?: boolean; }): Promise<boolean>
splitOn<R>(sepElem: T, options?: { eq?: Eq<T>; negate?: boolean; collector?: AsyncReducer<T, R> | undefined; }): AsyncStream<R>
splitOnSeq<R>(sepSeq: AsyncStreamSource<T>, options?: { eq?: Eq<T>; collector?: AsyncReducer<T, R> | undefined; }): AsyncStream<R>
splitWhere<R>(pred: (value: T, index: number) => MaybePromise<boolean>, options?: { negate?: boolean; collector?: AsyncReducer<T, R> | undefined; }): AsyncStream<R>
take(amount: number): AsyncStream<T>
takeWhile(pred: (value: T, index: number) => MaybePromise<boolean>, options?: { negate?: boolean; }): AsyncStream<T>
toArray(): Promise<T[]>
toJSON(): Promise<ToJSON<T[], "AsyncStream">>
toString(): string
window<R>(windowSize: number, options?: { skipAmount?: number; collector?: AsyncReducer<T, R> | undefined; }): AsyncStream<R>