es6-template-string
Easy and small template engine for the browser and nodejs
Install
npm install --save es6-template-string
API
render(str[, locals])
Render template str
with variable locals
Example:
var template = ; template;// It equals to;
compile(str)
Compile str
and return a function that accept one parameters: locals
Example:
var template = ; var logNodeVersion = template;;
Usage
var template = ; // This is hello, world; // This is 3;// orvar m = 1 n = 2;; var plus = template;// This is 5;
License
MIT