csv-read-json

0.1.1 • Public • Published

csv-read-json

This module helps you to using csv files like the json.

Usage

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"}
]
*/

Readme

Keywords

Package Sidebar

Install

npm i csv-read-json

Weekly Downloads

1

Version

0.1.1

License

ISC

Unpacked Size

1.55 kB

Total Files

3

Last publish

Collaborators

  • ali_furkqn