csv-manager

1.1.0 • Public • Published

CSV Manager

Usage

Import the package

const csv_manager = require('csv-manager');

JSON to CSV converter

Convert your json variable into a csv file.

csv_manager.toCSV(jsonArray,separator,path);

And your csv file will be saved in the path you wrote!

Example

Having the json array

var people=[
    {name: 'Bruce', surname: 'Wayne'},
    {name: 'Clark', surname:'Kent'},
    {name: 'Peter', surname: 'Parker'}
]

Use the function toCSV() to get your CSV file, using the separator you want, in this example we are using comma (,)

csv_manager.toCSV(people, ',' ,'people.csv');

And your CSV file will be ready!

Package Sidebar

Install

npm i csv-manager

Weekly Downloads

2

Version

1.1.0

License

ISC

Unpacked Size

1.84 kB

Total Files

3

Last publish

Collaborators

  • danielrod99