Example:
let te = new Templator(), array = [];
for (let i = 0; i < 100000; i++) {
array[i] = { val: i + 1 };
}
let text = te.compile('{{#.}}Number: {{val}}\n{{/.}}')(array);
//Note: Need load the 'handlebars' library.
JS.imports('$handlebars').then({
});
//Note: Need load the 'handlebars' runtime before using compiled files.
JS.imports('$handlebars-runtime').then({
});
Template class based on handlebars
模版工具类