Type Alias LazyChain<In, Out>
LazyChain<In, Out>: { asArray: ((data?: GenOrData<In>) => Promise<Out[]>); asAsync: ((data?: GenOrData<In>) => LazyChain<In, Out>); asGenerator: ((data?: GenOrData<In>) => AsyncGenerator<Out>); average: (() => LazyChain<any, number>); chunk: ((size: number,
returnRemainers?: boolean) => LazyChain<In, Out>); debounce: ((duration: Interval) => LazyChain<In, Out>); delay: ((options: DelayOptions) => LazyChain<In, Out>); drop: ((predicate: ((value: In) => boolean)) => LazyChain<In, Out>); duration: ((period: Interval) => LazyChain<In, Out>); filter: ((predicate: ((input: any) => boolean)) => LazyChain<In, Out>); firstOutput: ((data?: GenOrData<In>) => Promise<Out | undefined>); fromFunction: ((callback: (() => any)) => LazyChain<any, any>); input: ((data: GenOrData<In>) => LazyChain<In, Out>); lastOutput: ((data?: GenOrData<In>) => Promise<Out | undefined>); max: (() => LazyChain<any, number>); min: (() => LazyChain<any, number>); rank: ((r: RankFunction<In>,
options: Partial<RankOptions>) => LazyChain<In, Out>); rankArray: ((r: RankFunction<In>,
options: Partial<RankArrayOptions>) => LazyChain<In, Out>); reduce: ((reducer: ((values: any[]) => any)) => LazyChain<In, Out>); sum: (() => LazyChain<In, number>); take: ((limit: number) => LazyChain<In, Out>); tally: ((countArrayItems: boolean) => LazyChain<In, number>); transform: ((transformer: ((v: any) => any)) => LazyChain<In, Out>); } Type declaration
asArray: ((data?: GenOrData<In>) => Promise<Out[]>)
- (data?): Promise<Out[]>
Returns Promise<Out[]>
asGenerator: ((data?: GenOrData<In>) => AsyncGenerator<Out>)
- (data?): AsyncGenerator<Out>
Returns AsyncGenerator<Out>
average: (() => LazyChain<any, number>)
chunk: ((size: number, returnRemainers?: boolean) => LazyChain<In, Out>)
- (size, returnRemainers?): LazyChain<In, Out>
Parameters
- size: number
Optional
returnRemainers: boolean
drop: ((predicate: ((value: In) => boolean)) => LazyChain<In, Out>)
- (predicate): LazyChain<In, Out>
Parameters
- predicate: ((value: In) => boolean)
- (value): boolean
Returns boolean
filter: ((predicate: ((input: any) => boolean)) => LazyChain<In, Out>)
- (predicate): LazyChain<In, Out>
Parameters
- predicate: ((input: any) => boolean)
- (input): boolean
Returns boolean
firstOutput: ((data?: GenOrData<In>) => Promise<Out | undefined>)
- (data?): Promise<Out | undefined>
Returns Promise<Out | undefined>
fromFunction: ((callback: (() => any)) => LazyChain<any, any>)
lastOutput: ((data?: GenOrData<In>) => Promise<Out | undefined>)
- (data?): Promise<Out | undefined>
Returns Promise<Out | undefined>
max: (() => LazyChain<any, number>)
min: (() => LazyChain<any, number>)
reduce: ((reducer: ((values: any[]) => any)) => LazyChain<In, Out>)
- (reducer): LazyChain<In, Out>
Parameters
- reducer: ((values: any[]) => any)
sum: (() => LazyChain<In, number>)
take: ((limit: number) => LazyChain<In, Out>)
tally: ((countArrayItems: boolean) => LazyChain<In, number>)
transform: ((transformer: ((v: any) => any)) => LazyChain<In, Out>)
- (transformer): LazyChain<In, Out>
Parameters
- transformer: ((v: any) => any)
Lazy execution of a chain