Library to generate downloadable csv files from client side data.
npm install -save https://github.com/geosp/csv-generator.git
This package requires lodash/fp
, so make sure that's available in your app.
import * as CsvGenerator from 'csv-generator-client'
let generator = CsvGenerator.getInstance()
generator.download(fileName, data)
getInstance(settings)
Where settings is an object. Default settings are { separator: ',', addQuotes: false }
.
instance.download(fileName, dataArray)
Where fileName
is required and dataArray
is required to be of type Array
.
This implementation is based on csv-repository-client by AlexLibs