From cd0daec2dad99aaa44087e919fb2a64ab02b4451 Mon Sep 17 00:00:00 2001 From: jonian Date: Tue, 30 May 2023 13:06:37 +0300 Subject: [PATCH] optimize json and csv parser options --- src/builder/parsers/csv/index.js | 2 +- src/builder/parsers/json/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/builder/parsers/csv/index.js b/src/builder/parsers/csv/index.js index c378661..5cd0976 100644 --- a/src/builder/parsers/csv/index.js +++ b/src/builder/parsers/csv/index.js @@ -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 diff --git a/src/builder/parsers/json/index.js b/src/builder/parsers/json/index.js index f5abab6..3bf96b3 100644 --- a/src/builder/parsers/json/index.js +++ b/src/builder/parsers/json/index.js @@ -6,6 +6,6 @@ export default class Json { } toJSON(file) { - return destr(file, this.options) + return destr(file, { ...this.options, strict: true }) } }