Initializes a new instance of the MustacheWriter
class.
Clears all cached templates in this writer.
Parses and caches the given template
and returns the array of tokens that is generated from the parse.
The template to parse.
The tags to use.
High-level method that is used to render the given template
with the given view
.
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.
Low-level method that renders the given array of tokens
using the given context
and partials
.
The tokens to render.
The context to use for rendering the tokens.
The partials to use for rendering the tokens.
An object used to extract the portion of the original template that was contained in a higher-order section.
If the template doesn't use higher-order sections, this argument may be omitted.
Generated using TypeDoc
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.