UNPKG

@naturalcycles/nodejs-lib

Version:
15 lines (14 loc) 526 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ndJsonFileRead = void 0; const __1 = require("../.."); const pipelineFromNDJsonFile_1 = require("./pipelineFromNDJsonFile"); /** * Read whole NDJSON file into memory, resolve promise with resulting array of items. */ async function ndJsonFileRead(opt) { const res = []; await (0, pipelineFromNDJsonFile_1.pipelineFromNDJsonFile)([(0, __1.writablePushToArray)(res)], opt); return res; } exports.ndJsonFileRead = ndJsonFileRead;