Back-tick template engine for JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.eslintrc.yml
.gitignore
.npmignore
.travis.yml
AUTHORS
LICENSE
README.md
package-lock.json
package.json
test.js
tickplate.js

README.md

Tickplate

Back-tick template engine for JavaScript

Usage

  • Install: npm install tickplate
  • Require: const t = require('tickplate');
  • Place tag t before templated string

Examples:

const t = require('tickplate');

const data = {
  hello: 'Ave!',
  myFriend: {
    name: 'Marcus Aurelius',
    toString() {
      return this.name
    }
  },
  positions: ['imperor', 'philosopher', 'writer']
};

const template1 = t`Example: ${'hello'} ${'myFriend'} great ${'positions'} of Rome`;

console.log(template1(data));