wilton/mustache
Render mustache templates.
More...
Functions | |
String | render (String template, Object|Undefined values, Function|Undefined callback) |
Render template specified as a string. | |
String | renderFile (String templateFile, Object|Undefined values, Function|Undefined callback) |
Render template specified as a path to file. |
This module allows to render mustache templates from in-memory strings or directly from files.
Usage example:
String mustache::render | ( | String | template, |
Object|Undefined | values, | ||
Function|Undefined | callback | ||
) |
Renders template specified as a string.
template | String template body |
values | Object|Undefined template parameters to use |
callback | Function|Undefined callback to receive result or error |
String
rendered template String mustache::renderFile | ( | String | templateFile, |
Object|Undefined | values, | ||
Function|Undefined | callback | ||
) |
Renders template specified as a path to file.
templateFile | String path to template file |
values | Object|Undefined template parameters to use |
callback | Function|Undefined callback to receive result or error |
String
rendered template