@naturalcycles/nodejs-lib
Version:
Standard library for Node.js
10 lines (9 loc) • 417 B
TypeScript
import { Mapper } from '@naturalcycles/js-lib';
import { TransformOpt, TransformTyped } from '../stream.model';
export interface TransformThroughOptions extends TransformOpt {
}
/**
* Like `transformMap`, but lightweight, no concurrency, etc.
* Inspired by `through2`
*/
export declare function transformThrough<IN = any, OUT = IN>(mapper: Mapper<IN, OUT>, opt?: TransformThroughOptions): TransformTyped<IN, OUT>;