UNPKG

@naturalcycles/nodejs-lib

Version:
24 lines (23 loc) 824 B
import { AbortableAsyncMapper } from '@naturalcycles/js-lib'; import { TransformMapOptions, TransformLogProgressOptions } from '../..'; export interface NDJSONMapOptions<IN = any, OUT = IN> extends TransformMapOptions<IN, OUT>, TransformLogProgressOptions<IN> { inputFilePath: string; outputFilePath: string; limitInput?: number; limitOutput?: number; /** * @default 100_000 */ logEveryOutput?: number; /** * Defaults to `true` for ndjsonMap * * @default true */ flattenArrayOutput?: boolean; } /** * Unzips input file automatically, if it ends with `.gz`. * Zips output file automatically, if it ends with `.gz`. */ export declare function ndjsonMap<IN = any, OUT = any>(mapper: AbortableAsyncMapper<IN, OUT>, opt: NDJSONMapOptions<IN, OUT>): Promise<void>;