Convert array of data to CSV file
$ npm install ceseve
const csv = require('ceseve');
const data = [
{ title: "foo", property: "bar" },
{ title: "foo_2", property: "bar_2" }
];
const csvDocument = csv(data);
// csv:
// title,property
// foo,bar
// foo_2,bar_2You can specify options object:
const csvDocument = csv(data, {
separator: ';',
});
// csv:
// title;property
// foo;bar
// foo_2;bar_2MIT © Carlos Azaustre
Thanks goes to these wonderful people (emoji key):
Carlos Azaustre 💻 |
Sebastian Duque Restrepo 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!