MCPcopy
hub / github.com/jsdoc/jsdoc / render

Method render

lib/jsdoc/template.js:67–78  ·  view source on GitHub ↗

* Renders template with given data. * * This method automaticaly applies layout if set. * * @param {string} file - Template filename. * @param {object} data - Template variables (doesn't have to be object, but passing variables dictionary is best way and most common use).

(file, data)

Source from the content-addressed store, hash-verified

65 * @return {string} Rendered template.
66 */
67 render(file, data) {
68 // main content
69 let content = this.partial(file, data);
70
71 // apply layout
72 if (this.layout) {
73 data.content = content;
74 content = this.partial(this.layout, data);
75 }
76
77 return content;
78 }
79}
80exports.Template = Template;

Callers 4

generateFunction · 0.80
generateTutorialFunction · 0.80
getParseFunctionFunction · 0.80
jsx.jsFile · 0.80

Calls 1

partialMethod · 0.95

Tested by

no test coverage detected