transformAst()
ts
function transformAst(ast, data): string;Defined in: transformer.ts:34
Evaluates an Ast using the provided data and returns the transformed string.
Parameters
| Parameter | Type | Description |
|---|---|---|
ast | Ast | The AST produced by parseAst. |
data | DataRecord | DataArray | The data record or array used to replace template placeholders. |
Returns
string
The transformed string.
Throws
If the data type does not match the AST mode or if required data is missing.
Since
1.0.0
Author
Simon Kovtyk