How to use the csv.js.serialize function in csv

To help you get started, we’ve selected a few csv examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rafi16jan / rapyd-framework / client / src / components / Tree.jsx View on Github external
exportItem() {
    if (!this.state.selected) return this.gridOptions.api.deselectAll();
    FileSaver.saveAs(new Blob([csv.serialize({fields: Object.keys(this.state.selected[0]).map((key) => ({id: key})), records: this.state.selected})], {type: 'text/csv;charset=utf-8'}), document.getElementById('main-view').querySelector('div.title').innerText + '.csv');
    return this.gridOptions.api.deselectAll();
  }

csv

A mature CSV toolset with simple api, full of options and tested against large datasets.

MIT
Latest version published 2 months ago

Package Health Score

93 / 100
Full package analysis