easytpl

1.0.4 • Public • Published

easyTpl

easyTpl, a simple JavaScript template.

Install

  1. Node environment
npm install easytpl
  1. Client environment
bower install easytpl

Useage

 
var easyTpl = require('easyTpl');
var tpl = 'hello my name is {{name}}. I have a {{dog.age}} year old dog. His color is {{dog.color}}.';
 
var data = {
    name: 'hunger',
    dog: {
        color: 'yellow',
        age: 2
    }
};
 
var str = easyTpl(tpl, data);
console.log(str);

more demos in sample folder.

online demo? visit [http://book.jirengu.com/jirengu/easytpl].

Test

make test

Auther

Package Sidebar

Install

npm i easytpl

Weekly Downloads

10

Version

1.0.4

License

ISC

Last publish

Collaborators

  • hunger