solved Task 1
This commit is contained in:
parent
bfc7439f2d
commit
a93cf6a284
|
@ -26,15 +26,13 @@ const csvToJson = function(data) {
|
|||
}
|
||||
return obj
|
||||
})
|
||||
return data
|
||||
return JSON.stringify(data)
|
||||
}
|
||||
|
||||
|
||||
const startTime = Date.now()
|
||||
let data = fs.readFileSync('./csv/population.csv', 'utf8')
|
||||
const endTime = Date.now()
|
||||
console.log(csvToJson(data))
|
||||
printStats('./csv/population.csv', endTime - startTime)
|
||||
|
||||
fs.writeFileSync('./json/population.json', data)
|
||||
fs.writeFileSync('./json/population.json', csvToJson(data))
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue