UNPKG

540 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.ndJsonFileRead = void 0;
4const __1 = require("../..");
5const pipelineFromNDJsonFile_1 = require("./pipelineFromNDJsonFile");
6/**
7 * Read whole NDJSON file into memory, resolve promise with resulting array of items.
8 */
9async function ndJsonFileRead(opt) {
10 const res = [];
11 await (0, pipelineFromNDJsonFile_1.pipelineFromNDJsonFile)([(0, __1.writableForEach)(r => void res.push(r))], opt);
12 return res;
13}
14exports.ndJsonFileRead = ndJsonFileRead;