Hierarchy
- Liquid
Constructors
constructor
+ new Liquid(opts: LiquidOptions): Liquid
Defined in liquid.ts:26
Parameters:
| Name | Type | Default |
|---|---|---|
opts |
LiquidOptions | {} |
Returns: Liquid
Properties
filters
• filters: FilterMap
Defined in liquid.ts:25
options
• options: NormalizedFullOptions
Defined in liquid.ts:22
parser
• parser: Parser
Defined in liquid.ts:24
renderer
• renderer: Render
Defined in liquid.ts:23
tags
• tags: TagMap
Defined in liquid.ts:26
Methods
_evalValue
▸ _evalValue(str: string, ctx: Context): IterableIterator‹any›
Defined in liquid.ts:104
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:57
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:68
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:44
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:108
Parameters:
| Name | Type |
|---|---|
str |
string |
ctx |
Context |
Returns: Promise‹any›
evalValueSync
▸ evalValueSync(str: string, ctx: Context): any
Defined in liquid.ts:111
Parameters:
| Name | Type |
|---|---|
str |
string |
ctx |
Context |
Returns: any
express
▸ express(): (Anonymous function)
Defined in liquid.ts:124
Returns: (Anonymous function)
getTemplate
▸ getTemplate(file: string, opts?: LiquidOptions): Promise‹Template[]›
Defined in liquid.ts:142
Parameters:
| Name | Type |
|---|---|
file |
string |
opts? |
LiquidOptions |
Returns: Promise‹Template[]›
getTemplateSync
▸ getTemplateSync(file: string, opts?: LiquidOptions): Template[]
Defined in liquid.ts:148
Parameters:
| Name | Type |
|---|---|
file |
string |
opts? |
LiquidOptions |
Returns: Template[]
Private lookupError
▸ lookupError(file: string, roots: string[]): any
Defined in liquid.ts:132
Parameters:
| Name | Type |
|---|---|
file |
string |
roots |
string[] |
Returns: any
parse
▸ parse(html: string, filepath?: undefined | string): Template[]
Defined in liquid.ts:38
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:61
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:64
Parameters:
| Name | Type |
|---|---|
html |
string |
scope? |
undefined | object |
opts? |
LiquidOptions |
Returns: any
parseFile
▸ parseFile(file: string, opts?: LiquidOptions): Promise‹Template[]›
Defined in liquid.ts:89
Parameters:
| Name | Type |
|---|---|
file |
string |
opts? |
LiquidOptions |
Returns: Promise‹Template[]›
parseFileSync
▸ parseFileSync(file: string, opts?: LiquidOptions): Template[]
Defined in liquid.ts:92
Parameters:
| Name | Type |
|---|---|
file |
string |
opts? |
LiquidOptions |
Returns: Template[]
plugin
▸ plugin(plugin: function): void
Defined in liquid.ts:121
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:115
Parameters:
| Name | Type |
|---|---|
name |
string |
filter |
FilterImplOptions |
Returns: void
registerTag
▸ registerTag(name: string, tag: TagImplOptions): void
Defined in liquid.ts:118
Parameters:
| Name | Type |
|---|---|
name |
string |
tag |
TagImplOptions |
Returns: void
render
▸ render(tpl: Template[], scope?: undefined | object, opts?: LiquidOptions): Promise‹any›
Defined in liquid.ts:50
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:95
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:99
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:53
Parameters:
| Name | Type |
|---|---|
tpl |
Template[] |
scope? |
undefined | object |
opts? |
LiquidOptions |
Returns: any