@dpuse/dpuse-tool-adaltas-csv-parser 0.0.154 → 0.0.156

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.
@@ -254,8 +254,10 @@ function ae(e, t, n, r, i) {
254
254
  if (typeof n == "string" ? (r = n, n = 0) : n > 2147483647 ? n = 2147483647 : n < -2147483648 && (n = -2147483648), n = +n, isNaN(n) && (n = i ? 0 : e.length - 1), n < 0 && (n = e.length + n), n >= e.length) {
255
255
  if (i) return -1;
256
256
  n = e.length - 1;
257
- } else if (n < 0) if (i) n = 0;
258
- else return -1;
257
+ } else if (n < 0) {
258
+ if (i) n = 0;
259
+ else return -1;
260
+ }
259
261
  if (typeof t == "string" && (t = _.from(t, r)), C(t)) return t.length === 0 ? -1 : oe(e, t, n, r, i);
260
262
  if (typeof t == "number") return t &= 255, _.TYPED_ARRAY_SUPPORT && typeof Uint8Array.prototype.indexOf == "function" ? i ? Uint8Array.prototype.indexOf.call(e, t, n) : Uint8Array.prototype.lastIndexOf.call(e, t, n) : oe(e, [t], n, r, i);
261
263
  throw TypeError("val must be string, number or Buffer");
@@ -941,13 +943,15 @@ function lt(t, n) {
941
943
  }
942
944
  var ut = {}, dt;
943
945
  function ft(e) {
944
- if (V(dt) && (dt = ot.env.NODE_DEBUG || ""), e = e.toUpperCase(), !ut[e]) if (RegExp("\\b" + e + "\\b", "i").test(dt)) {
945
- var t = 0;
946
- ut[e] = function() {
947
- var n = ct.apply(null, arguments);
948
- console.error("%s %d: %s", e, t, n);
949
- };
950
- } else ut[e] = function() {};
946
+ if (V(dt) && (dt = ot.env.NODE_DEBUG || ""), e = e.toUpperCase(), !ut[e]) {
947
+ if (RegExp("\\b" + e + "\\b", "i").test(dt)) {
948
+ var t = 0;
949
+ ut[e] = function() {
950
+ var n = ct.apply(null, arguments);
951
+ console.error("%s %d: %s", e, t, n);
952
+ };
953
+ } else ut[e] = function() {};
954
+ }
951
955
  return ut[e];
952
956
  }
953
957
  function B(e, t) {
@@ -1258,17 +1262,18 @@ function Ht(e, t, n, r, i) {
1258
1262
  var a = qt(t, n);
1259
1263
  if (a) e.emit("error", a);
1260
1264
  else if (n === null) t.reading = !1, Jt(e, t);
1261
- else if (t.objectMode || n && n.length > 0) if (t.ended && !i) {
1262
- var o = /* @__PURE__ */ Error("stream.push() after EOF");
1263
- e.emit("error", o);
1264
- } else if (t.endEmitted && i) {
1265
- var s = /* @__PURE__ */ Error("stream.unshift() after end event");
1266
- e.emit("error", s);
1267
- } else {
1268
- var c;
1269
- t.decoder && !i && !r && (n = t.decoder.write(n), c = !t.objectMode && n.length === 0), i || (t.reading = !1), c || (t.flowing && t.length === 0 && !t.sync ? (e.emit("data", n), e.read(0)) : (t.length += t.objectMode ? 1 : n.length, i ? t.buffer.unshift(n) : t.buffer.push(n), t.needReadable && Yt(e))), Zt(e, t);
1270
- }
1271
- else i || (t.reading = !1);
1265
+ else if (t.objectMode || n && n.length > 0) {
1266
+ if (t.ended && !i) {
1267
+ var o = /* @__PURE__ */ Error("stream.push() after EOF");
1268
+ e.emit("error", o);
1269
+ } else if (t.endEmitted && i) {
1270
+ var s = /* @__PURE__ */ Error("stream.unshift() after end event");
1271
+ e.emit("error", s);
1272
+ } else {
1273
+ var c;
1274
+ t.decoder && !i && !r && (n = t.decoder.write(n), c = !t.objectMode && n.length === 0), i || (t.reading = !1), c || (t.flowing && t.length === 0 && !t.sync ? (e.emit("data", n), e.read(0)) : (t.length += t.objectMode ? 1 : n.length, i ? t.buffer.unshift(n) : t.buffer.push(n), t.needReadable && Yt(e))), Zt(e, t);
1275
+ }
1276
+ } else i || (t.reading = !1);
1272
1277
  return Ut(t);
1273
1278
  }
1274
1279
  function Ut(e) {
@@ -1796,7 +1801,7 @@ var Bn = function(e) {
1796
1801
  this.buf.copy(t, 0, 0, e), this.buf = t;
1797
1802
  }
1798
1803
  toString(e) {
1799
- return e ? this.buf.slice(0, this.length).toString(e) : Uint8Array.prototype.slice.call(this.buf.slice(0, this.length));
1804
+ return e ? this.buf.toString(e, 0, this.length) : Uint8Array.prototype.slice.call(this.buf.slice(0, this.length));
1800
1805
  }
1801
1806
  toJSON() {
1802
1807
  return this.toString("utf8");
@@ -1993,8 +1998,10 @@ var Bn = function(e) {
1993
1998
  if (t.info === void 0 || t.info === null || t.info === !1) t.info = !1;
1994
1999
  else if (t.info !== !0) throw Error(`Invalid Option: info must be true, got ${JSON.stringify(t.info)}`);
1995
2000
  if (t.max_record_size === void 0 || t.max_record_size === null || t.max_record_size === !1) t.max_record_size = 0;
1996
- else if (!(Number.isInteger(t.max_record_size) && t.max_record_size >= 0)) if (typeof t.max_record_size == "string" && /\d+/.test(t.max_record_size)) t.max_record_size = parseInt(t.max_record_size);
1997
- else throw Error(`Invalid Option: max_record_size must be a positive integer, got ${JSON.stringify(t.max_record_size)}`);
2001
+ else if (!(Number.isInteger(t.max_record_size) && t.max_record_size >= 0)) {
2002
+ if (typeof t.max_record_size == "string" && /\d+/.test(t.max_record_size)) t.max_record_size = parseInt(t.max_record_size);
2003
+ else throw Error(`Invalid Option: max_record_size must be a positive integer, got ${JSON.stringify(t.max_record_size)}`);
2004
+ }
1998
2005
  if (t.objname === void 0 || t.objname === null || t.objname === !1) t.objname = void 0;
1999
2006
  else if (O(t.objname)) {
2000
2007
  if (t.objname.length === 0) throw Error("Invalid Option: objname must be a non empty buffer");
@@ -2045,20 +2052,34 @@ var Bn = function(e) {
2045
2052
  `got ${JSON.stringify(e)}`
2046
2053
  ], t);
2047
2054
  return typeof e == "string" && (e = _.from(e, t.encoding)), e;
2048
- }), typeof t.relax_column_count != "boolean") if (t.relax_column_count === void 0 || t.relax_column_count === null) t.relax_column_count = !1;
2049
- else throw Error(`Invalid Option: relax_column_count must be a boolean, got ${JSON.stringify(t.relax_column_count)}`);
2050
- if (typeof t.relax_column_count_less != "boolean") if (t.relax_column_count_less === void 0 || t.relax_column_count_less === null) t.relax_column_count_less = !1;
2051
- else throw Error(`Invalid Option: relax_column_count_less must be a boolean, got ${JSON.stringify(t.relax_column_count_less)}`);
2052
- if (typeof t.relax_column_count_more != "boolean") if (t.relax_column_count_more === void 0 || t.relax_column_count_more === null) t.relax_column_count_more = !1;
2053
- else throw Error(`Invalid Option: relax_column_count_more must be a boolean, got ${JSON.stringify(t.relax_column_count_more)}`);
2054
- if (typeof t.relax_quotes != "boolean") if (t.relax_quotes === void 0 || t.relax_quotes === null) t.relax_quotes = !1;
2055
- else throw Error(`Invalid Option: relax_quotes must be a boolean, got ${JSON.stringify(t.relax_quotes)}`);
2056
- if (typeof t.skip_empty_lines != "boolean") if (t.skip_empty_lines === void 0 || t.skip_empty_lines === null) t.skip_empty_lines = !1;
2057
- else throw Error(`Invalid Option: skip_empty_lines must be a boolean, got ${JSON.stringify(t.skip_empty_lines)}`);
2058
- if (typeof t.skip_records_with_empty_values != "boolean") if (t.skip_records_with_empty_values === void 0 || t.skip_records_with_empty_values === null) t.skip_records_with_empty_values = !1;
2059
- else throw Error(`Invalid Option: skip_records_with_empty_values must be a boolean, got ${JSON.stringify(t.skip_records_with_empty_values)}`);
2060
- if (typeof t.skip_records_with_error != "boolean") if (t.skip_records_with_error === void 0 || t.skip_records_with_error === null) t.skip_records_with_error = !1;
2061
- else throw Error(`Invalid Option: skip_records_with_error must be a boolean, got ${JSON.stringify(t.skip_records_with_error)}`);
2055
+ }), typeof t.relax_column_count != "boolean") {
2056
+ if (t.relax_column_count === void 0 || t.relax_column_count === null) t.relax_column_count = !1;
2057
+ else throw Error(`Invalid Option: relax_column_count must be a boolean, got ${JSON.stringify(t.relax_column_count)}`);
2058
+ }
2059
+ if (typeof t.relax_column_count_less != "boolean") {
2060
+ if (t.relax_column_count_less === void 0 || t.relax_column_count_less === null) t.relax_column_count_less = !1;
2061
+ else throw Error(`Invalid Option: relax_column_count_less must be a boolean, got ${JSON.stringify(t.relax_column_count_less)}`);
2062
+ }
2063
+ if (typeof t.relax_column_count_more != "boolean") {
2064
+ if (t.relax_column_count_more === void 0 || t.relax_column_count_more === null) t.relax_column_count_more = !1;
2065
+ else throw Error(`Invalid Option: relax_column_count_more must be a boolean, got ${JSON.stringify(t.relax_column_count_more)}`);
2066
+ }
2067
+ if (typeof t.relax_quotes != "boolean") {
2068
+ if (t.relax_quotes === void 0 || t.relax_quotes === null) t.relax_quotes = !1;
2069
+ else throw Error(`Invalid Option: relax_quotes must be a boolean, got ${JSON.stringify(t.relax_quotes)}`);
2070
+ }
2071
+ if (typeof t.skip_empty_lines != "boolean") {
2072
+ if (t.skip_empty_lines === void 0 || t.skip_empty_lines === null) t.skip_empty_lines = !1;
2073
+ else throw Error(`Invalid Option: skip_empty_lines must be a boolean, got ${JSON.stringify(t.skip_empty_lines)}`);
2074
+ }
2075
+ if (typeof t.skip_records_with_empty_values != "boolean") {
2076
+ if (t.skip_records_with_empty_values === void 0 || t.skip_records_with_empty_values === null) t.skip_records_with_empty_values = !1;
2077
+ else throw Error(`Invalid Option: skip_records_with_empty_values must be a boolean, got ${JSON.stringify(t.skip_records_with_empty_values)}`);
2078
+ }
2079
+ if (typeof t.skip_records_with_error != "boolean") {
2080
+ if (t.skip_records_with_error === void 0 || t.skip_records_with_error === null) t.skip_records_with_error = !1;
2081
+ else throw Error(`Invalid Option: skip_records_with_error must be a boolean, got ${JSON.stringify(t.skip_records_with_error)}`);
2082
+ }
2062
2083
  if (t.rtrim === void 0 || t.rtrim === null || t.rtrim === !1) t.rtrim = !1;
2063
2084
  else if (t.rtrim !== !0) throw Error(`Invalid Option: rtrim must be a boolean, got ${JSON.stringify(t.rtrim)}`);
2064
2085
  if (t.ltrim === void 0 || t.ltrim === null || t.ltrim === !1) t.ltrim = !1;
@@ -2066,13 +2087,17 @@ var Bn = function(e) {
2066
2087
  if (t.trim === void 0 || t.trim === null || t.trim === !1) t.trim = !1;
2067
2088
  else if (t.trim !== !0) throw Error(`Invalid Option: trim must be a boolean, got ${JSON.stringify(t.trim)}`);
2068
2089
  if (t.trim === !0 && e.ltrim !== !1 ? t.ltrim = !0 : t.ltrim !== !0 && (t.ltrim = !1), t.trim === !0 && e.rtrim !== !1 ? t.rtrim = !0 : t.rtrim !== !0 && (t.rtrim = !1), t.to === void 0 || t.to === null) t.to = -1;
2069
- else if (t.to !== -1) if (typeof t.to == "string" && /\d+/.test(t.to) && (t.to = parseInt(t.to)), Number.isInteger(t.to)) {
2070
- if (t.to <= 0) throw Error(`Invalid Option: to must be a positive integer greater than 0, got ${JSON.stringify(e.to)}`);
2071
- } else throw Error(`Invalid Option: to must be an integer, got ${JSON.stringify(e.to)}`);
2090
+ else if (t.to !== -1) {
2091
+ if (typeof t.to == "string" && /\d+/.test(t.to) && (t.to = parseInt(t.to)), Number.isInteger(t.to)) {
2092
+ if (t.to <= 0) throw Error(`Invalid Option: to must be a positive integer greater than 0, got ${JSON.stringify(e.to)}`);
2093
+ } else throw Error(`Invalid Option: to must be an integer, got ${JSON.stringify(e.to)}`);
2094
+ }
2072
2095
  if (t.to_line === void 0 || t.to_line === null) t.to_line = -1;
2073
- else if (t.to_line !== -1) if (typeof t.to_line == "string" && /\d+/.test(t.to_line) && (t.to_line = parseInt(t.to_line)), Number.isInteger(t.to_line)) {
2074
- if (t.to_line <= 0) throw Error(`Invalid Option: to_line must be a positive integer greater than 0, got ${JSON.stringify(e.to_line)}`);
2075
- } else throw Error(`Invalid Option: to_line must be an integer, got ${JSON.stringify(e.to_line)}`);
2096
+ else if (t.to_line !== -1) {
2097
+ if (typeof t.to_line == "string" && /\d+/.test(t.to_line) && (t.to_line = parseInt(t.to_line)), Number.isInteger(t.to_line)) {
2098
+ if (t.to_line <= 0) throw Error(`Invalid Option: to_line must be a positive integer greater than 0, got ${JSON.stringify(e.to_line)}`);
2099
+ } else throw Error(`Invalid Option: to_line must be an integer, got ${JSON.stringify(e.to_line)}`);
2100
+ }
2076
2101
  return t;
2077
2102
  }, Kn = function(e, t) {
2078
2103
  t || ({delimiter_auto: t} = Gn({ delimiter_auto: !0 })), typeof e == "string" && (e = _.from(e)), O(e) && (e = ((e) => {
@@ -2136,30 +2161,34 @@ var Bn = function(e) {
2136
2161
  }
2137
2162
  }
2138
2163
  let { previousBuf: C } = this.state, w;
2139
- if (C === void 0) if (e === void 0) {
2140
- r();
2141
- return;
2142
- } else w = e;
2143
- else w = C !== void 0 && e === void 0 ? C : _.concat([C, e]);
2144
- if (ee === !1) if (i === !1) this.state.bomSkipped = !0;
2145
- else if (w.length < 3) {
2146
- if (t === !1) {
2147
- this.state.previousBuf = w;
2164
+ if (C === void 0) {
2165
+ if (e === void 0) {
2166
+ r();
2148
2167
  return;
2149
2168
  }
2150
- } else {
2151
- for (let e in $) if ($[e].compare(w, 0, $[e].length) === 0) {
2152
- let t = $[e].length;
2153
- this.state.bufBytesStart += t, w = w.slice(t);
2154
- let n = Gn({
2155
- ...this.original_options,
2156
- encoding: e
2157
- });
2158
- for (let e in n) this.options[e] = n[e];
2159
- ({comment: v, escape: y, quote: b} = this.options);
2160
- break;
2169
+ w = e;
2170
+ } else w = C !== void 0 && e === void 0 ? C : _.concat([C, e]);
2171
+ if (ee === !1) {
2172
+ if (i === !1) this.state.bomSkipped = !0;
2173
+ else if (w.length < 3) {
2174
+ if (t === !1) {
2175
+ this.state.previousBuf = w;
2176
+ return;
2177
+ }
2178
+ } else {
2179
+ for (let e in $) if ($[e].compare(w, 0, $[e].length) === 0) {
2180
+ let t = $[e].length;
2181
+ this.state.bufBytesStart += t, w = w.slice(t);
2182
+ let n = Gn({
2183
+ ...this.original_options,
2184
+ encoding: e
2185
+ });
2186
+ for (let e in n) this.options[e] = n[e];
2187
+ ({comment: v, escape: y, quote: b} = this.options);
2188
+ break;
2189
+ }
2190
+ this.state.bomSkipped = !0;
2161
2191
  }
2162
- this.state.bomSkipped = !0;
2163
2192
  }
2164
2193
  let ie = w.length, T;
2165
2194
  for (T = 0; T < ie && !this.__needMoreData(T, ie, t); T++) {
@@ -2171,43 +2200,47 @@ var Bn = function(e) {
2171
2200
  let e = w[T];
2172
2201
  if (d === !0 && ne.append(e), (e === Yn || e === Xn) && this.state.wasRowDelimiter === !1 && (this.state.wasRowDelimiter = !0), this.state.escaping === !0) this.state.escaping = !1;
2173
2202
  else {
2174
- if (y !== null && this.state.quoting === !0 && this.__isEscape(w, T, e) && T + y.length < ie) if (re) {
2175
- if (this.__isQuote(w, T + y.length)) {
2203
+ if (y !== null && this.state.quoting === !0 && this.__isEscape(w, T, e) && T + y.length < ie) {
2204
+ if (re) {
2205
+ if (this.__isQuote(w, T + y.length)) {
2206
+ this.state.escaping = !0, T += y.length - 1;
2207
+ continue;
2208
+ }
2209
+ } else {
2176
2210
  this.state.escaping = !0, T += y.length - 1;
2177
2211
  continue;
2178
2212
  }
2179
- } else {
2180
- this.state.escaping = !0, T += y.length - 1;
2181
- continue;
2182
2213
  }
2183
- if (this.state.commenting === !1 && this.__isQuote(w, T)) if (this.state.quoting === !0) {
2184
- let t = w[T + b.length], n = p && this.__isCharTrimable(w, T + b.length), r = v !== null && this.__compareBytes(v, w, T + b.length, t), i = this.__isDelimiter(w, T + b.length, t), a = x.length === 0 ? this.__autoDiscoverRecordDelimiter(w, T + b.length) : this.__isRecordDelimiter(t, w, T + b.length);
2185
- if (y !== null && this.__isEscape(w, T, e) && this.__isQuote(w, T + y.length)) T += y.length - 1;
2186
- else if (!t || i || a || r || n) {
2187
- this.state.quoting = !1, this.state.wasQuoting = !0, T += b.length - 1;
2214
+ if (this.state.commenting === !1 && this.__isQuote(w, T)) {
2215
+ if (this.state.quoting === !0) {
2216
+ let t = w[T + b.length], n = p && this.__isCharTrimable(w, T + b.length), r = v !== null && this.__compareBytes(v, w, T + b.length, t), i = this.__isDelimiter(w, T + b.length, t), a = x.length === 0 ? this.__autoDiscoverRecordDelimiter(w, T + b.length) : this.__isRecordDelimiter(t, w, T + b.length);
2217
+ if (y !== null && this.__isEscape(w, T, e) && this.__isQuote(w, T + y.length)) T += y.length - 1;
2218
+ else if (!t || i || a || r || n) {
2219
+ this.state.quoting = !1, this.state.wasQuoting = !0, T += b.length - 1;
2220
+ continue;
2221
+ } else if (f === !1) {
2222
+ let e = this.__error(new Q("CSV_INVALID_CLOSING_QUOTE", [
2223
+ "Invalid Closing Quote:",
2224
+ `got "${String.fromCharCode(t)}"`,
2225
+ `at line ${this.info.lines}`,
2226
+ "instead of delimiter, record delimiter, trimable character",
2227
+ "(if activated) or comment"
2228
+ ], this.options, this.__infoField()));
2229
+ if (e !== void 0) return e;
2230
+ } else this.state.quoting = !1, this.state.wasQuoting = !0, this.state.field.prepend(b), T += b.length - 1;
2231
+ } else if (this.state.field.length !== 0) {
2232
+ if (f === !1) {
2233
+ let e = this.__infoField(), t = Object.keys($).map((e) => $[e].equals(this.state.field.toString()) ? e : !1).filter(Boolean)[0], n = this.__error(new Q("INVALID_OPENING_QUOTE", [
2234
+ "Invalid Opening Quote:",
2235
+ `a quote is found on field ${JSON.stringify(e.column)} at line ${e.lines}, value is ${JSON.stringify(this.state.field.toString(s))}`,
2236
+ t ? `(${t} bom)` : void 0
2237
+ ], this.options, e, { field: this.state.field }));
2238
+ if (n !== void 0) return n;
2239
+ }
2240
+ } else {
2241
+ this.state.quoting = !0, T += b.length - 1;
2188
2242
  continue;
2189
- } else if (f === !1) {
2190
- let e = this.__error(new Q("CSV_INVALID_CLOSING_QUOTE", [
2191
- "Invalid Closing Quote:",
2192
- `got "${String.fromCharCode(t)}"`,
2193
- `at line ${this.info.lines}`,
2194
- "instead of delimiter, record delimiter, trimable character",
2195
- "(if activated) or comment"
2196
- ], this.options, this.__infoField()));
2197
- if (e !== void 0) return e;
2198
- } else this.state.quoting = !1, this.state.wasQuoting = !0, this.state.field.prepend(b), T += b.length - 1;
2199
- } else if (this.state.field.length !== 0) {
2200
- if (f === !1) {
2201
- let e = this.__infoField(), t = Object.keys($).map((e) => $[e].equals(this.state.field.toString()) ? e : !1).filter(Boolean)[0], n = this.__error(new Q("INVALID_OPENING_QUOTE", [
2202
- "Invalid Opening Quote:",
2203
- `a quote is found on field ${JSON.stringify(e.column)} at line ${e.lines}, value is ${JSON.stringify(this.state.field.toString(s))}`,
2204
- t ? `(${t} bom)` : void 0
2205
- ], this.options, e, { field: this.state.field }));
2206
- if (n !== void 0) return n;
2207
2243
  }
2208
- } else {
2209
- this.state.quoting = !0, T += b.length - 1;
2210
- continue;
2211
2244
  }
2212
2245
  if (this.state.quoting === !1) {
2213
2246
  let t = this.__isRecordDelimiter(e, w, T);
@@ -2269,17 +2302,18 @@ var Bn = function(e) {
2269
2302
  continue;
2270
2303
  }
2271
2304
  }
2272
- if (t === !0) if (this.state.quoting === !0) {
2273
- let e = this.__error(new Q("CSV_QUOTE_NOT_CLOSED", ["Quote Not Closed:", `the parsing is finished with an opening quote at line ${this.info.lines}`], this.options, this.__infoField()));
2274
- if (e !== void 0) return e;
2275
- } else if (this.state.wasQuoting === !0 || this.state.record.length !== 0 || this.state.field.length !== 0) {
2276
- this.info.bytes = this.state.bufBytesStart + T;
2277
- let e = this.__onField();
2278
- if (e !== void 0) return e;
2279
- let t = this.__onRecord(n);
2280
- if (t !== void 0) return t;
2281
- } else this.state.wasRowDelimiter === !0 ? this.info.empty_lines++ : this.state.commenting === !0 && this.info.comment_lines++;
2282
- else this.state.bufBytesStart += T, this.state.previousBuf = w.slice(T);
2305
+ if (t === !0) {
2306
+ if (this.state.quoting === !0) {
2307
+ let e = this.__error(new Q("CSV_QUOTE_NOT_CLOSED", ["Quote Not Closed:", `the parsing is finished with an opening quote at line ${this.info.lines}`], this.options, this.__infoField()));
2308
+ if (e !== void 0) return e;
2309
+ } else if (this.state.wasQuoting === !0 || this.state.record.length !== 0 || this.state.field.length !== 0) {
2310
+ this.info.bytes = this.state.bufBytesStart + T;
2311
+ let e = this.__onField();
2312
+ if (e !== void 0) return e;
2313
+ let t = this.__onRecord(n);
2314
+ if (t !== void 0) return t;
2315
+ } else this.state.wasRowDelimiter === !0 ? this.info.empty_lines++ : this.state.commenting === !0 && this.info.comment_lines++;
2316
+ } else this.state.bufBytesStart += T, this.state.previousBuf = w.slice(T);
2283
2317
  this.state.wasRowDelimiter === !0 && (this.info.lines++, this.state.wasRowDelimiter = !1);
2284
2318
  },
2285
2319
  __onRecord: function(e) {
@@ -2321,7 +2355,12 @@ var Bn = function(e) {
2321
2355
  let { objname: a } = this.options;
2322
2356
  if (t !== !1) {
2323
2357
  let o = {};
2324
- for (let e = 0, r = f.length; e < r; e++) t[e] === void 0 || t[e].disabled || (n === !0 && o[t[e].name] !== void 0 ? Array.isArray(o[t[e].name]) ? o[t[e].name] = o[t[e].name].concat(f[e]) : o[t[e].name] = [o[t[e].name], f[e]] : o[t[e].name] = f[e]);
2358
+ for (let e = 0, r = f.length; e < r; e++) t[e] === void 0 || t[e].disabled || (n === !0 && Object.hasOwn(o, t[e].name) ? Array.isArray(o[t[e].name]) ? o[t[e].name] = o[t[e].name].concat(f[e]) : o[t[e].name] = [o[t[e].name], f[e]] : Object.defineProperty(o, t[e].name, {
2359
+ value: f[e],
2360
+ enumerable: !0,
2361
+ writable: !0,
2362
+ configurable: !0
2363
+ }));
2325
2364
  if (l === !0 || i === !0) {
2326
2365
  let t = Object.assign({ record: o }, l === !0 ? { raw: this.state.rawBuffer.toString(r) } : {}, i === !0 ? { info: this.__infoRecord() } : {}), n = this.__push(a === void 0 ? t : [o[a], t], e);
2327
2366
  if (n) return n;
@@ -2780,5 +2819,3 @@ async function mr(e, t) {
2780
2819
  }
2781
2820
  //#endregion
2782
2821
  export { ur as Tool };
2783
-
2784
- //# sourceMappingURL=dpuse-tool-adaltas-csv-parser.es.js.map