duster/js/permanently_disabled_test_cases/helpers_dump_parameters
2020-05-23 14:28:21 -04:00
..
input1.json Add a template to dump the parameters to a custom helper. 2020-05-23 14:28:21 -04:00
main.dust Add a template to dump the parameters to a custom helper. 2020-05-23 14:28:21 -04:00
README.md Add a template to dump the parameters to a custom helper. 2020-05-23 14:28:21 -04:00

Chunk

Some sort of object which contains an array of rendered elements. For example, using:

Testing dump parameters
{#names}
    {.}
{/names}

The first interation would have ["Testing dump parameters", "Alice"].

Question: Do any helpers read from chunk or just write to it? If its just writing, then my current architecture of just returning a String would work fine, though having a shared buffer thats written to would probably reduce the allocations and therefore improve performance.

Context

Some sort of object that contains essentially the "breadcrumbs" variable I am currently using to track the context tree. Also tracks template name, globals and options. I guess options would be that whole preserve whitespace or not option. I was just going to store this option on the dust renderer type, but I guess I should bake it into the breadcrumbs to pass into helpers if I implement support for custom helpers.

Bodies

No idea, but based on the name I assume it contains the contents of the helper, or at least some way to render the internal body of the helper.

Params

A mapping of the parameters directly on the helper.