@bytebrand/export-cars 1.21.10 → 1.21.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,8 +6,13 @@ class SantanderCSVBuilder extends cronicle_helper_1.XMLBuilderBase {
6
6
  async buildStart() {
7
7
  }
8
8
  async addItem(car) {
9
- let values = Object.values(car);
10
- await this.write(values.join('","') + '\n');
9
+ let values = Object.values(car).map(value => {
10
+ if (typeof value === 'string' && value.includes(',')) {
11
+ return `"${value}"`;
12
+ }
13
+ return value;
14
+ });
15
+ await this.write(values.join(',') + '\n');
11
16
  }
12
17
  async buildEnd() {
13
18
  await this.end();
@@ -1 +1 @@
1
- {"version":3,"file":"santander-csv.builder.js","sourceRoot":"","sources":["../../src/formats/santander-csv.builder.ts"],"names":[],"mappings":";;;AAAA,gEAA4D;AAE5D,MAAa,mBAAoB,SAAQ,gCAAc;IACtD,KAAK,CAAC,UAAU;IAChB,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,GAAY;QACzB,IAAI,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAChC,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;IAC7C,CAAC;IAED,KAAK,CAAC,QAAQ;QACb,MAAM,IAAI,CAAC,GAAG,EAAE,CAAC;IAClB,CAAC;CACD;AAZD,kDAYC"}
1
+ {"version":3,"file":"santander-csv.builder.js","sourceRoot":"","sources":["../../src/formats/santander-csv.builder.ts"],"names":[],"mappings":";;;AAAA,gEAA4D;AAE5D,MAAa,mBAAoB,SAAQ,gCAAc;IACtD,KAAK,CAAC,UAAU;IAChB,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,GAAY;QACzB,IAAI,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;YAC3C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;gBACrD,OAAO,IAAI,KAAK,GAAG,CAAC;aACpB;YACD,OAAO,KAAK,CAAC;QACd,CAAC,CAAC,CAAC;QACH,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;IAC3C,CAAC;IAED,KAAK,CAAC,QAAQ;QACb,MAAM,IAAI,CAAC,GAAG,EAAE,CAAC;IAClB,CAAC;CACD;AAjBD,kDAiBC"}