et-string
Desription
It is the basic template for et-template.
It tranlsate the templete string to a function-string to assemble et-template
Usage
The templete string.
var _ = require('lodash'); if (it.length > 1) { <% It just has so many items. %>} else if (it.length === 1) { <% It just has one item. %>} else { <% It is empty list; %>}
The result string.
var _ = ; exports { var result = ''; if itlength > 1 result += ` It just has so many items. `; else if itlength === 1 result += ` It just has one item. `; else result += ` It is empty list; `; return result;}
Just replace '<%' and '%>' to es6 teamplte then finish the et-string.
Attention
- Do not use es6 template literals ` in et-string.
- Use require to import dependecies and write on the header of codes.
License
MIT