tickplate

Back-tick templates for JavaScript

Usage no npm install needed!

<script type="module">
  import tickplate from 'https://cdn.skypack.dev/tickplate';
</script>

README

Tickplate - Back-tick templates for JavaScript

ci status codacy snyk npm version npm downloads/month npm downloads

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: ['emperor', 'philosopher', 'writer'],
};

const templ = t`${'hello'} ${'myFriend'}, great ${'positions'} of Rome`;

console.log(templ(data));

License & Contributors

Copyright (c) 2017-2021 Metarhia contributors. Tickplate is MIT licensed.
Tickplate is a part of Metarhia technology stack.