MCPcopy Create free account
hub / github.com/GoogleCloudPlatform/nodejs-docs-samples / buildRenderedHtml

Function buildRenderedHtml

run/idp-sql/handlebars.js:26–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24 * @returns {Promise}
25 */
26const buildRenderedHtml = async config => {
27 if (!index) index = await readFile(__dirname + '/views/index.html', 'utf8');
28 if (!template) template = handlebars.compile(index);
29 return template(config);
30};
31
32// Register customer Handlebars.js helper
33handlebars.registerHelper('ternary', (comp1, comp2, opt1, opt2) => {

Callers 2

app.jsFile · 0.70
app.test.jsFile · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected