MCPcopy Index your code
hub / github.com/rtfpessoa/diff2html / render

Method render

src/hoganjs-utils.ts:39–47  ·  view source on GitHub ↗
(namespace: string, view: string, params: Hogan.Context, partials?: Hogan.Partials, indent?: string)

Source from the content-addressed store, hash-verified

37 }
38
39 render(namespace: string, view: string, params: Hogan.Context, partials?: Hogan.Partials, indent?: string): string {
40 const templateKey = this.templateKey(namespace, view);
41 try {
42 const template = this.preCompiledTemplates[templateKey];
43 return template.render(params, partials, indent);
44 } catch (_e) {
45 throw new Error(`Could not find template to render '${templateKey}'`);
46 }
47 }
48
49 template(namespace: string, view: string): Hogan.Template {
50 return this.preCompiledTemplates[this.templateKey(namespace, view)];

Callers 5

htmlFunction · 0.45

Calls 1

templateKeyMethod · 0.95

Tested by

no test coverage detected