templatinglanguage

A simple templating language written as part of a tutorial on JavaScript.

templatinglanguage

A simple templating language written as part of a tutorial on JavaScript.

var parse = require('templatinglanguage');
var template = parse('hello {{ world }}');
var context = {world: '?'};
 
console.log(template(context));  // === 'hello ?' 

returns a function that accepts a string to parse it into a templating function.

returns a function that accepts context to render a string.

MIT