Skip to content

wulisensen/gs-downloadCsv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

make a csv file to download in browser

Resources

License

Stars

Watchers

Forks

Packages

No packages published