UNPKG

@naturalcycles/nodejs-lib

Version:
17 lines (13 loc) 510 B
import type { ReadableTyped } from '../stream.model.js'; /** Returns a Readable of [already parsed] NDJSON objects. Replaces a list of operations: - requireFileToExist(inputPath) - fs.createReadStream - createUnzip (only if path ends with '.gz') - transformSplitOnNewline - transformJsonParse To add a Limit or Offset: just add .take() or .drop(), example: createReadStreamAsNDJson().take(100) */ export declare function createReadStreamAsNDJson<ROW = any>(inputPath: string): ReadableTyped<ROW>;