tualo-template
v0.0.2
Published
tualo-template
Downloads
2
Readme
TEMPLATE
Template is a simple template engine for objects.
Usage
var Template = require('tualo-template');
var obj = {
title: "MyTitle",
list: [
{
title: "Item 1",
},
{
title: "Item 2"
},
{
title: "Item 3"
}
]
};
var template = new Template('{title}\n<foreach item="list">\t*{title}\n</foreach>');
var output = template.render(obj);