Skip to content

Commit

Permalink
feat: detect and exclude the byte order mark (BOM) from the CSV input…
Browse files Browse the repository at this point in the history
… if present (#492)
  • Loading branch information
mhagmajer authored Sep 4, 2023
1 parent ea6605b commit e147919
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 21 deletions.
40 changes: 20 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"box-node-sdk": "^3.1.1",
"chalk": "^2.4.1",
"cli-progress": "^2.1.0",
"csv": "^6.3.1",
"csv": "^6.3.3",
"date-fns": "^1.29.0",
"debug": "^4.1.0",
"express": "^4.17.1",
Expand Down
1 change: 1 addition & 0 deletions src/box-command.js
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,7 @@ class BoxCommand extends Command {
*/
async _handleCsvFile(fileContents, fieldMapping) {
let parsedData = await csvParse(fileContents, {
bom: true,
delimiter: ',',
cast(value, context) {
if (value.length === 0) {
Expand Down

0 comments on commit e147919

Please sign in to comment.