From what I've experienced, the README may have it wrong. It says:
var template = "{%each fruits as val key%}the {{key}} is {{val}}{%endeach%}";
// …
but I had to reverse val and key (as key val) to get it working as expected. Which is fine (reads better IMO), but might not be what you want and, somehow, could be less "standard" (with regards to what common libraries such as Underscore, LoDash… expect with their iterators).
Hi,
From what I've experienced, the README may have it wrong. It says:
but I had to reverse val and key (
as key val
) to get it working as expected. Which is fine (reads better IMO), but might not be what you want and, somehow, could be less "standard" (with regards to what common libraries such as Underscore, LoDash… expect with their iterators).