CSV templating with mustache.js
npm install --save csv-template
const csvTemplate = require('csv-template')
csvTemplate({
template: 'example.csv',
output: 'output.csv',
data: {
name: 'John Doe',
age: 26,
email: 'johndoe@example.com',
birthdate: '01/01/1990',
projects: ['project1', 'project2', 'project3']
}
}).then((res) => {
console.log(res)
}).catch((err) => {
console.error(err)
})
npm run test
MIT LICENSE.md
- Fork it
- Create your feature branch (
git checkout -b new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin new-feature
) - Create new Pull Request
Crafted with <3 by amimaro