Represents a rendering context by wrapping a view object and maintaining a reference to the parent context.
A simple string scanner that is used by the template parser to find tokens in template strings.
A Writer knows how to take a stream of tokens and render them to a string
, given a context.
It also maintains a cache of templates to avoid the need to parse the same template twice.
Escapes HTML-characters.
The name of the module.
The opening and closing tags to parse.
The version of the module.
Clears all cached templates in this writer.
Parses and caches the given template in the default writer and returns the array of tokens it contains.
Doing this ahead of time avoids the need to parse templates on the fly as they are rendered.
The template to parse.
The tags to use.
Renders the template
with the given view
and partials
using the default writer.
The template to render.
The view to render the template with.
Either an object that contains the names and templates of partials that are used in a template
-- or --
A function that is used to load partial template on the fly that takes a single argument: the name of the partial.
The tags to use.
Renders the template
with the given view
and partials
using the default writer.
The template to render.
The view to render the template with.
Either an object that contains the names and templates of partials that are used in a template
-- or --
A function that is used to load partial template on the fly that takes a single argument: the name of the partial.
Generated using TypeDoc
Provides the functionality to render templates with
{{mustaches}}
.