simple-template-engine
v1.0.3
Published
Simple templating engine that takes arbitrary template files and populates with handler functions
Downloads
9
Maintainers
Readme
Simple Template Engine
Usage
var templeteEngine = require('./simple_templating_engine.js');
var template = "Hello, <% change_me %>";
var handler = function(key) { return { '<% change_me %>': 'World' } };
templeteEngine.populate(template, handler).then(populated => {
console.log(populated);
});
handler = function(key) { return { '<% change_me %>': 'Async World' } };
(async function() {
let populated = await templeteEngine.populate(template, handler);
console.log(populated);
})();