UNPKG

@naturalcycles/nodejs-lib

Version:
20 lines (19 loc) 768 B
import type { AbortableAsyncMapper } from '@naturalcycles/js-lib/types'; import type { TransformLogProgressOptions, TransformMapOptions } from '../index.js'; 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; } /** * Unzips input file automatically, if it ends with `.gz`. * Zips output file automatically, if it ends with `.gz`. * * @deprecated use Pipeline directly */ export declare function ndjsonMap<IN = any, OUT = any>(mapper: AbortableAsyncMapper<IN, OUT>, opt: NDJSONMapOptions<IN, OUT>): Promise<void>;