estools/estemplate

Associative arrays

erochaamorim opened this issue · 2 comments

According to the docs, estemplate does support regular array templating. But what if I want to template an associative array? (object, or dictionary)

Does it support something like:
var a = {%= elements %};

If it doesn't, would it be too hard for someone (e.g.: me) to pick up a fork and implement it?

Unfortunately, it doesn't support them directly, but it's relatively easy to replace this with <%= { type: 'ObjectExpression', properties: elements } %>.

Thanks for the reply!