1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | var array_1 = require("./csv-stringifiers/array");
|
4 | var field_stringifier_1 = require("./field-stringifier");
|
5 | var object_1 = require("./csv-stringifiers/object");
|
6 | var CsvStringifierFactory = (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 | }());
|
19 | exports.CsvStringifierFactory = CsvStringifierFactory;
|
20 |
|
\ | No newline at end of file |