txt-template
v0.2.2
Published
TXT templating with mustache.js
Downloads
11
Readme
txt-template
TXT templating with mustache.js
Installation
npm install --save txt-template
Usage
const txtTemplate = require('txt-template')
txtTemplate({
template: 'example.txt',
output: 'output.txt',
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
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Crafted with <3 by amimaro