multiple-csv-merge-to-json
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -17,4 +17,5 @@ /// <reference types="node" /> | ||
}; | ||
declare function writeOutputFile(options: MultCsvMergeToJsonOptions, jsonObj: Array<Object> | Object): void; | ||
declare function mergeCsvFilesToJsonArray(options: MultCsvMergeToJsonOptions): Promise<void>; | ||
declare function getJsonArray(options: MultCsvMergeToJsonOptions): Promise<Object[]>; | ||
export { MultCsvMergeToJsonOptions, mergeCsvFilesToJsonArray, getJsonArray }; | ||
export { MultCsvMergeToJsonOptions, mergeCsvFilesToJsonArray, getJsonArray, writeOutputFile }; |
@@ -12,3 +12,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getJsonArray = exports.mergeCsvFilesToJsonArray = void 0; | ||
exports.writeOutputFile = exports.getJsonArray = exports.mergeCsvFilesToJsonArray = void 0; | ||
const fs_1 = require("fs"); | ||
@@ -28,2 +28,3 @@ const csv = require("csvtojson"); | ||
} | ||
exports.writeOutputFile = writeOutputFile; | ||
function readExistingJsonDataArray(options) { | ||
@@ -146,2 +147,10 @@ return __awaiter(this, void 0, void 0, function* () { | ||
} | ||
function optionsAreValid(options) { | ||
// if (options.groupBy && options.groupBy?.length > 1) { | ||
// console.log( | ||
// "multiple-csv-merge-to-json groupBy array size not supported. Maximum group by levels is 1" | ||
// ); | ||
// return false; | ||
// } | ||
} | ||
function mergeCsvFilesToJsonArray(options) { | ||
@@ -148,0 +157,0 @@ return __awaiter(this, void 0, void 0, function* () { |
{ | ||
"name": "multiple-csv-merge-to-json", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Merge multiple CSV files and output to JSON file", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
19792
209