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

40 lines
No EOL
8.9 KiB
JavaScript

"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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiL1VzZXJzL2t4aWFuZy93b3JrL3Byb2plY3RzL2NzdjJqc29uL3NyYy9QYXJhbWV0ZXJzLnRzIiwic291cmNlcyI6WyIvVXNlcnMva3hpYW5nL3dvcmsvcHJvamVjdHMvY3N2Mmpzb24vc3JjL1BhcmFtZXRlcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFvRkEscUJBQTRCLE1BQStCO0lBQ3pELElBQU0sWUFBWSxHQUFrQjtRQUNsQyxTQUFTLEVBQUUsR0FBRztRQUNkLGFBQWEsRUFBRSxTQUFTO1FBQ3hCLGNBQWMsRUFBRSxTQUFTO1FBQ3pCLEtBQUssRUFBRSxHQUFHO1FBQ1YsSUFBSSxFQUFFLElBQUk7UUFDVixTQUFTLEVBQUUsS0FBSztRQUNoQixXQUFXLEVBQUUsS0FBSztRQUNsQixlQUFlO1FBQ2YsUUFBUSxFQUFFLEtBQUs7UUFDZixPQUFPLEVBQUUs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