Skip to content

Commit

Permalink
Format data script - small correction on script to accept split on bo…
Browse files Browse the repository at this point in the history
…th "," and ";"
  • Loading branch information
rzafari42 committed Jan 23, 2025
1 parent 46b60b8 commit 68c0a9a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions format-datas/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ export default class App {
async start() {
console.log("--- START ---");

//await this.formatDatas();
console.time("Time Check Data");
// await this.formatDatas();
// console.time("Time Check Data");
await this.checkDatas();
console.timeEnd("Time Check Data");
// console.timeEnd("Time Check Data");
this.done();
}

Expand Down Expand Up @@ -1021,7 +1021,7 @@ export default class App {
let line;

while ((line = liner.next()) !== false) {
const lineFormated = line.toString("ascii").trim().split(";");
const lineFormated = line.toString("ascii").trim().split(/[,;]/);
if (!header) {
header = {};
lineFormated.map((r) => (header[r.toLowerCase()] = ""));
Expand Down

0 comments on commit 68c0a9a

Please sign in to comment.