跳到主要内容
版本:Next

NunjucksEnvironment

Index

Constructors

constructor

Methods

addFilter

  • addFilter(name: string, callback: (...args: any[]) => string): any

addGlobal

  • addGlobal(name: string, value: any): any

getFilter

  • getFilter(name: string): any

hasExtension

  • hasExtension(name: string): boolean

render

  • render(name: string, context?: Record<string, any>, callback?: TemplateCallback<string>): any

renderString

  • renderString(tpl: string, context?: Record<string, any>, options?: RenderOptions, callback?: TemplateCallback<string>): any