tbranyen / combyne

A template engine that works the way you expect.
MIT License
144 stars 19 forks source link

Order of key val in each… as… #59

Closed chikamichi closed 9 years ago

chikamichi commented 9 years ago

Hi,

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).

chikamichi commented 9 years ago

Dah, false positive in my specs!

:cake:

tbranyen commented 9 years ago

Glad you figured it out!