Skip to content

amimaro/csv-template

Repository files navigation

csv-template Build Status js-standard-style

CSV templating with mustache.js

Installation

npm install --save csv-template

Usage

const csvTemplate = require('csv-template')

csvTemplate({
  template: 'example.csv',
  output: 'output.csv',
  data: {
    name: 'John Doe',
    age: 26,
    email: '[email protected]',
    birthdate: '01/01/1990',
    projects: ['project1', 'project2', 'project3']
  }
}).then((res) => {
  console.log(res)
}).catch((err) => {
  console.error(err)
})

Testing

npm run test

License

MIT LICENSE.md

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin new-feature)
  5. Create new Pull Request

Crafted with <3 by amimaro

About

CSV templating with mustache.js

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published