tempt

0.1.0 • Public • Published

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

Package Sidebar

Install

npm i tempt

Weekly Downloads

1

Version

0.1.0

License

MIT

Last publish

Collaborators

  • remarkablemark