UNPKG

1.14 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3var array_1 = require("./csv-stringifiers/array");
4var field_stringifier_1 = require("./field-stringifier");
5var object_1 = require("./csv-stringifiers/object");
6var CsvStringifierFactory = /** @class */ (function () {
7 function CsvStringifierFactory() {
8 }
9 CsvStringifierFactory.prototype.createArrayCsvStringifier = function (params) {
10 var fieldStringifier = field_stringifier_1.createFieldStringifier(params.fieldDelimiter, params.alwaysQuote);
11 return new array_1.ArrayCsvStringifier(fieldStringifier, params.recordDelimiter, params.header);
12 };
13 CsvStringifierFactory.prototype.createObjectCsvStringifier = function (params) {
14 var fieldStringifier = field_stringifier_1.createFieldStringifier(params.fieldDelimiter, params.alwaysQuote);
15 return new object_1.ObjectCsvStringifier(fieldStringifier, params.header, params.recordDelimiter, params.headerIdDelimiter);
16 };
17 return CsvStringifierFactory;
18}());
19exports.CsvStringifierFactory = CsvStringifierFactory;
20//# sourceMappingURL=csv-stringifier-factory.js.map
\No newline at end of file