0.0.2 • Published 9 years ago

tualo-template v0.0.2

Weekly downloads
7
License
GPL-3.0
Repository
github
Last release
9 years ago

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);