Class: Liquid

Hierarchy

  • Liquid

Constructors

constructor

+ new Liquid(opts: LiquidOptions): Liquid

Defined in liquid.ts:25

Parameters:

Name Type Default
opts LiquidOptions {}

Returns: Liquid

Properties

filters

filters: FilterMap

Defined in liquid.ts:24


options

options: NormalizedFullOptions

Defined in liquid.ts:21


parser

parser: Parser

Defined in liquid.ts:23


renderer

renderer: Render

Defined in liquid.ts:22


tags

tags: TagMap

Defined in liquid.ts:25

Methods

_evalValue

_evalValue(str: string, ctx: Context): IterableIterator‹any›

Defined in liquid.ts:103

Parameters:

Name Type
str string
ctx Context

Returns: IterableIterator‹any›


_parseAndRender

_parseAndRender(html: string, scope?: undefined | object, opts?: LiquidOptions, sync?: undefined | false | true): IterableIterator‹any›

Defined in liquid.ts:56

Parameters:

Name Type
html string
scope? undefined | object
opts? LiquidOptions
sync? undefined | false | true

Returns: IterableIterator‹any›


_parseFile

_parseFile(file: string, opts?: LiquidOptions, sync?: undefined | false | true): IterableIterator‹any›

Defined in liquid.ts:67

Parameters:

Name Type
file string
opts? LiquidOptions
sync? undefined | false | true

Returns: IterableIterator‹any›


_render

_render(tpl: Template[], scope?: undefined | object, opts?: LiquidOptions, sync?: undefined | false | true): IterableIterator‹any›

Defined in liquid.ts:43

Parameters:

Name Type
tpl Template[]
scope? undefined | object
opts? LiquidOptions
sync? undefined | false | true

Returns: IterableIterator‹any›


evalValue

evalValue(str: string, ctx: Context): Promise‹any›

Defined in liquid.ts:107

Parameters:

Name Type
str string
ctx Context

Returns: Promise‹any›


evalValueSync

evalValueSync(str: string, ctx: Context): any

Defined in liquid.ts:110

Parameters:

Name Type
str string
ctx Context

Returns: any


express

express(): (Anonymous function)

Defined in liquid.ts:123

Returns: (Anonymous function)


getTemplate

getTemplate(file: string, opts?: LiquidOptions): Promise‹Template[]›

Defined in liquid.ts:141

deprecated use parseFile instead

Parameters:

Name Type
file string
opts? LiquidOptions

Returns: Promise‹Template[]›


getTemplateSync

getTemplateSync(file: string, opts?: LiquidOptions): Template[]

Defined in liquid.ts:147

deprecated use parseFileSync instead

Parameters:

Name Type
file string
opts? LiquidOptions

Returns: Template[]


Private lookupError

lookupError(file: string, roots: string[]): any

Defined in liquid.ts:131

Parameters:

Name Type
file string
roots string[]

Returns: any


parse

parse(html: string, filepath?: undefined | string): Template[]

Defined in liquid.ts:37

Parameters:

Name Type
html string
filepath? undefined | string

Returns: Template[]


parseAndRender

parseAndRender(html: string, scope?: undefined | object, opts?: LiquidOptions): Promise‹any›

Defined in liquid.ts:60

Parameters:

Name Type
html string
scope? undefined | object
opts? LiquidOptions

Returns: Promise‹any›


parseAndRenderSync

parseAndRenderSync(html: string, scope?: undefined | object, opts?: LiquidOptions): any

Defined in liquid.ts:63

Parameters:

Name Type
html string
scope? undefined | object
opts? LiquidOptions

Returns: any


parseFile

parseFile(file: string, opts?: LiquidOptions): Promise‹Template[]›

Defined in liquid.ts:88

Parameters:

Name Type
file string
opts? LiquidOptions

Returns: Promise‹Template[]›


parseFileSync

parseFileSync(file: string, opts?: LiquidOptions): Template[]

Defined in liquid.ts:91

Parameters:

Name Type
file string
opts? LiquidOptions

Returns: Template[]


plugin

plugin(plugin: function): void

Defined in liquid.ts:120

Parameters:

plugin: function

▸ (this: Liquid, L: Liquid): void

Parameters:

Name Type
this Liquid
L Liquid

Returns: void


registerFilter

registerFilter(name: string, filter: FilterImplOptions): void

Defined in liquid.ts:114

Parameters:

Name Type
name string
filter FilterImplOptions

Returns: void


registerTag

registerTag(name: string, tag: TagImplOptions): void

Defined in liquid.ts:117

Parameters:

Name Type
name string
tag TagImplOptions

Returns: void


render

render(tpl: Template[], scope?: undefined | object, opts?: LiquidOptions): Promise‹any›

Defined in liquid.ts:49

Parameters:

Name Type
tpl Template[]
scope? undefined | object
opts? LiquidOptions

Returns: Promise‹any›


renderFile

renderFile(file: string, ctx?: undefined | object, opts?: LiquidOptions): Promise‹any›

Defined in liquid.ts:94

Parameters:

Name Type
file string
ctx? undefined | object
opts? LiquidOptions

Returns: Promise‹any›


renderFileSync

renderFileSync(file: string, ctx?: undefined | object, opts?: LiquidOptions): any

Defined in liquid.ts:98

Parameters:

Name Type
file string
ctx? undefined | object
opts? LiquidOptions

Returns: any


renderSync

renderSync(tpl: Template[], scope?: undefined | object, opts?: LiquidOptions): any

Defined in liquid.ts:52

Parameters:

Name Type
tpl Template[]
scope? undefined | object
opts? LiquidOptions

Returns: any