stromjs
Version:
Dependency-free streams utils for Node.js
5 lines (4 loc) • 3.33 kB
TypeScript
/// <reference types="node" />
import { strom } from "./functions";
export * from "./utils";
export declare const fromArray: typeof import("./functions/fromArray").fromArray, map: <T, R>(mapper: (chunk: T, encoding: string) => R, options?: import("stream").TransformOptions | undefined) => import("stream").Transform, flatMap: <T, R>(mapper: ((chunk: T, encoding: string) => R[]) | ((chunk: T, encoding: string) => Promise<R[]>), options?: import("stream").TransformOptions | undefined) => import("stream").Transform, filter: <T>(predicate: ((chunk: T, encoding: string) => boolean) | ((chunk: T, encoding: string) => Promise<boolean>), options?: import("stream").TransformOptions | undefined) => import("stream").Transform, reduce: <T, R>(iteratee: ((previousValue: R, chunk: T, encoding: string) => R) | ((previousValue: R, chunk: T, encoding: string) => Promise<R>), initialValue: R, options?: import("stream").TransformOptions | undefined) => import("stream").Transform, split: typeof import("./functions/split").split, join: (separator: string, options?: (import("./functions/baseDefinitions").WithEncoding & import("stream").TransformOptions) | undefined) => import("stream").Transform, replace: typeof import("./functions/replace").replace, parse: typeof import("./functions/parse").parse, stringify: typeof import("./functions/stringify").stringify, collect: (options?: import("stream").TransformOptions | undefined) => import("stream").Transform, concat: typeof import("./functions/concat").concat, merge: typeof import("./functions/merge").merge, duplex: typeof import("./functions/duplex").duplex, child: typeof import("./functions/child").child, last: typeof import("./functions/last").last, batch: (batchSize?: number | undefined, maxBatchAge?: number | undefined, options?: import("stream").TransformOptions | undefined) => import("stream").Transform, unbatch: (options?: import("stream").TransformOptions | undefined) => import("stream").Transform, rate: (targetRate?: number | undefined, period?: number | undefined, options?: (import("stream").TransformOptions & import("./functions/rate").RateOptions) | undefined) => import("stream").Transform, parallelMap: <T, R>(mapper: (data: T) => R, parallel?: number | undefined, sleepTime?: number | undefined, options?: import("stream").TransformOptions | undefined) => import("stream").Transform, accumulator: (flushStrategy: import("./functions/accumulator").FlushStrategy, batchSize: number, keyBy?: string | undefined, options?: import("stream").TransformOptions | undefined) => import("stream").Transform, accumulatorBy: <T>(flushStrategy: import("./functions/accumulator").FlushStrategy, iteratee: import("./functions/accumulator").AccumulatorByIteratee<T>, options?: import("stream").TransformOptions | undefined) => import("stream").Transform, compose: (streams: (import("stream").Readable | import("stream").Writable)[], errorCallback?: ((err: any) => void) | undefined, options?: import("stream").TransformOptions | undefined) => import("./functions/compose").Compose, demux: (pipelineConstructor: (destKey?: string | undefined, chunk?: any) => import("stream").Writable | import("stream").Writable[], demuxBy: string | ((chunk: any) => string), options?: import("./functions/demux").DemuxOptions | undefined) => import("stream").Duplex, instance: typeof strom;