WME/aufgabe5/node_modules/csvtojson/.ts-node/46be5da2105bfdf13e8db086405c89f751746b6e7f1dbb5a5600bad96af1b73b/cb4de662f3e1942d355f90feda3b32028330c67b7273b4691bf9739a14f2084c.js

40 lines
8.9 KiB
JavaScript
Raw Normal View History

2019-01-09 11:25:28 +00:00
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function mergeParams(params) {
var defaultParam = {
delimiter: ',',
ignoreColumns: undefined,
includeColumns: undefined,
quote: '"',
trim: true,
checkType: false,
ignoreEmpty: false,
// fork: false,
noheader: false,
headers: undefined,
flatKeys: false,
maxRowLength: 0,
checkColumn: false,
escape: '"',
colParser: {},
eol: undefined,
alwaysSplitAtEOL: false,
output: "json"
};
if (!params) {
params = {};
}
for (var key in params) {
if (params.hasOwnProperty(key)) {
if (Array.isArray(params[key])) {
defaultParam[key] = [].concat(params[key]);
}
else {
defaultParam[key] = params[key];
}
}
}
return defaultParam;
}
exports.mergeParams = mergeParams;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiL1VzZXJzL2t4aWFuZy93b3JrL3Byb2plY3RzL2NzdjJqc29uL3NyYy9QYXJhbWV0ZXJzLnRzIiwic291cmNlcyI6WyIvVXNlcnMva3hpYW5nL3dvcmsvcHJvamVjdHMvY3N2Mmpzb24vc3JjL1BhcmFtZXRlcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFvRkEscUJBQTRCLE1BQStCO0lBQ3pELElBQU0sWUFBWSxHQUFrQjtRQUNsQyxTQUFTLEVBQUUsR0FBRztRQUNkLGFBQWEsRUFBRSxTQUFTO1FBQ3hCLGNBQWMsRUFBRSxTQUFTO1FBQ3pCLEtBQUssRUFBRSxHQUFHO1FBQ1YsSUFBSSxFQUFFLElBQUk7UUFDVixTQUFTLEVBQUUsS0FBSztRQUNoQixXQUFXLEVBQUUsS0FBSztRQUNsQixlQUFlO1FBQ2YsUUFBUSxFQUFFLEtBQ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