gs-csv

1.0.2 • Public • Published

gs-csv GitHub license

make a csv file to download in browser

you can use it in ES6:

import downloadCsv from 'gs-csv';

const data = [{ a: 3, b: 4, c: '1' }, { a: 1, b: 2, c: '0' }];
const head = {
    a: 'name',
    b: 'status',
};
const enumobj = {
    c: {
        '0': 'on',
        '1': 'off',
    },
};
const filename = 'filename';

downloadCsv({ data, head, enumobj, filename });

then you can download csv file

Readme

Keywords

Package Sidebar

Install

npm i gs-csv

Weekly Downloads

0

Version

1.0.2

License

ISC

Unpacked Size

4.34 kB

Total Files

5

Last publish

Collaborators

  • wuguangsen