1 | import { readableFromArray } from '../readable/readableFromArray'
|
2 | import { pipelineToNDJsonFile, PipelineToNDJsonFileOptions } from './pipelineToNDJsonFile'
|
3 |
|
4 | /**
|
5 | * Write array of objects (in memory) into NDJSON file. Resolve when done.
|
6 | */
|
7 | export async function ndJsonFileWrite<IN = any>(
|
8 | items: IN[],
|
9 | opt: PipelineToNDJsonFileOptions,
|
10 | ): Promise<void> {
|
11 | await pipelineToNDJsonFile([readableFromArray(items)], opt)
|
12 | }
|