Skip to content

Commit

Permalink
optimize json and csv parser options
Browse files Browse the repository at this point in the history
  • Loading branch information
jonian committed May 30, 2023
1 parent 0109c0a commit cd0daec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/builder/parsers/csv/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default class Csv {
}

async toJSON (file) {
const body = await csv({ output: 'json', ...this.options }).fromString(file)
const body = await csv({ ...this.options, output: 'json' }).fromString(file)

return {
body
Expand Down
2 changes: 1 addition & 1 deletion src/builder/parsers/json/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ export default class Json {
}

toJSON(file) {
return destr(file, this.options)
return destr(file, { ...this.options, strict: true })
}
}

0 comments on commit cd0daec

Please sign in to comment.