Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/lume/deps/nunjucks.ts>default.Environment

🔥 Static site generator for Deno 🦕
Very Popular
Go to Latest
class default.Environment
import { default } from "https://deno.land/x/lume@v1.15.0/deps/nunjucks.ts";
const { Environment } = default;

Constructors

new
Environment(loader?: ILoader | ILoader[] | null, opts?: ConfigureOptions)

Properties

options: { autoescape: boolean; }

Methods

addExtension(name: string, ext: Extension): Environment
addFilter(
name: string,
func: (...args: any[]) => any,
async?: boolean,
): Environment
addGlobal(name: string, value: any): Environment
express(app: object): void
getExtension(name: string): Extension
getFilter(name: string): (...args: any[]) => any
getGlobal(name: string): any
getTemplate(name: string, eagerCompile?: boolean): Template
getTemplate(
name: string,
eagerCompile?: boolean,
callback?: Callback<Error, Template>,
): void
hasExtension(name: string): boolean
on(event: "load", fn: (
name: string,
source: { src: string; path: string; noCache: boolean; },
loader: Loader,
) => void
): void
removeExtension(name: string): void
render(name: string, context?: object): string
render(
name: string,
context?: object,
callback?: TemplateCallback<string>,
): void
renderString(name: string, context: object): string
renderString(
name: string,
context: object,
callback?: TemplateCallback<string>,
): void