tempt
v0.1.0
Published
Simplified templating inspired by Mustache.
Downloads
4
Maintainers
Readme
tempt
Simplified templating inspired by Mustache:
tempt(template, data);
Note: Only the variable tag type is supported. For templating with greater features, check out:
Installation
NPM:
$ npm install tempt --save
Yarn:
$ yarn add tempt
Usage
Import the module:
var tempt = require('tempt');
Render template with data object:
tempt('Hello, {{name}}!', { name: 'world' });
// => 'Hello, world!'
Render template with data array:
tempt('Hello, {{0}}!', ['world']);
// => 'Hello, world!'
Testing
$ npm test
$ npm run lint:fix
Release
$ npm run release
$ git push --follow-tags