Koder's Template Language
What is is
Fast and simple string templating language and parser factory. KTL makes a function from your template. Simply pass a data object and get back your parsed string.
output = ktl(template)(data[,sanitizer]);
Key features
- Fast.
- No dependencies.
- Does not assume what template will be used for.
- You can pass a optional sanitizer to call on all outputs.
Syntax
{{ property }}
{{# array }}
index: {{$}}, value: {{_}}
{{#}}
{{? condition }}
it is true
{{:}}
or is it false
{{?}}