Index based javascript templates. Try it.
npm install --save index-template
<script src="//unpkg.com/index-template/dist/index-template.js"></script>
This will add a global function named indexTemplate
.
var indexTemplate = require('index-template');
indexTemplate('Lorem {0} dolor {1} amet', 'ipsum', 'sit'); // outputs: lorem ipsum dolor sit amet
or
var indexTemplate = require('index-template');
var values = ['ipsum', 'sit'];
indexTemplate('Lorem {0} dolor {1} amet', values); // outputs: lorem ipsum dolor sit amet