Skip to content

Conversation

@tesaide
Copy link

@tesaide tesaide commented Dec 9, 2025

No description provided.

try { row[col.name] = JSON.parse(val); }
catch (e) { row[col.name] = val.split(',').map(s => s.trim()); }
} else {
row[col.name] = val.split(',').map(s => s.trim());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets fix DRY on this line

row[col.name] = val.split(',').map(s => s.trim());

Instead we can use boolean like

let useCommaParsing = false;

and set it to true

index.ts Outdated
}
}
} else if (typeof val === 'number') {
row[col.name] = [val.toString()];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are u sure this is possible? if you will try to add console.log, can you make it executing and show screenshot here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot Log

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets research why wand whether it is needed

index.ts Outdated
}
}
} else if (typeof val === 'number') {
row[col.name] = [val.toString()];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets research why wand whether it is needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants