This module helps you to using csv files like the json.
Has only one parameter (path: string)
CSVparser(path: string): Array
const CSVparser = require("csv-read-json"),
file = CSVparser("./file")
// CSV file is
/* type,name
fruit,apple
vegetable,potato
fruit,banana
*/
console.log(file)
//Result
/* [
{type:"fruit",name: "apple"},
{type: "vegetable", name: "potato"}
{type: "fruit", name: "banana"}
]
*/