0.1.0 • Published 6 years ago

tempt v0.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

tempt

NPM

NPM version Build Status Coverage Status

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

License

MIT