From 4a37b288388354601cca456582901ec7217d7e0d Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Sun, 23 Jan 2022 18:36:59 +0300 Subject: [PATCH] Update update.js --- scripts/update.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/update.js b/scripts/update.js index 78a6ef6..8f089a3 100644 --- a/scripts/update.js +++ b/scripts/update.js @@ -1,4 +1,4 @@ -const csv = require('csvtojson') +const { csv } = require('./core') const path = require('path') const glob = require('glob') const fs = require('fs') @@ -17,7 +17,7 @@ glob(`${DATABASE_DIR}/*.csv`, async function (err, files) { const inputFilename = path.parse(inputFile).name const outputFile = `${OUTPUT_DIR}/${inputFilename}.json` - const json = await csv().fromFile(inputFile) + const json = await csv.load(inputFile) fs.writeFileSync(path.resolve(outputFile), JSON.stringify(json, null, 2)) } })