Represents a single registered template. Templates consist of an arbitrary number
of trees (e.g. there may be more than a single root node), and are not compiled.
When a template is rendered its node structure is computed with any provided template
data, culminating in one or more root nodes. The root node(s) are then joined together
and returned as a single output string.
The render process uses two dirty but necessary hacks. First, the template function is
decompiled into a string (but is not modified), so that it can be eval'ed within the scope
of Jaml.Template.prototype. This allows the second hack, which is the use of the 'with' keyword.
This allows us to keep the pretty DSL-like syntax, though is not as efficient as it could be.
Represents a single registered template. Templates consist of an arbitrary number of trees (e.g. there may be more than a single root node), and are not compiled. When a template is rendered its node structure is computed with any provided template data, culminating in one or more root nodes. The root node(s) are then joined together and returned as a single output string.
The render process uses two dirty but necessary hacks. First, the template function is decompiled into a string (but is not modified), so that it can be eval'ed within the scope of Jaml.Template.prototype. This allows the second hack, which is the use of the 'with' keyword. This allows us to keep the pretty DSL-like syntax, though is not as efficient as it could be.