Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/eta/src/core.ts>Eta

Embedded JS template engine for Node, Deno, and the browser. Lighweight, fast, and pluggable. Written in TypeScript
Go to Latest
class Eta
import { Eta } from "https://deno.land/x/eta@v3.2.0/src/core.ts";

Constructors

new
Eta(customConfig?: Partial<EtaConfig>)

Properties

compile
compileBody
compileToString
config: EtaConfig
filepathCache: Record<string, string>
parse
readFile: null | ((this: Eta, path: string) => string)
render
renderAsync
renderString
renderStringAsync
resolvePath: null | ((
this: Eta,
template: string,
options?: Partial<Options>,
) => string)
RuntimeErr
templatesAsync: Cacher<TemplateFunction>
templatesSync: Cacher<TemplateFunction>

Methods

configure(customConfig: Partial<EtaConfig>)
loadTemplate(
name: string,
template: string | TemplateFunction,
options?: { async: boolean; },
): void
withConfig(customConfig: Partial<EtaConfig>)