Closed JaneOri closed 4 years ago
Hey fam!
This adds integer count loops to output based on numbers. Most frequently for me I've needed this for heavy visual builds.
var template = stache("<div>{{#for(integerValue)}}[{{scope.index}}]{{/for}}</div>"); var frag = template({ integerValue: 3 }); // frag.firstChild.innerHTML === "[0][1][2]"
I queried about this years ago, wish I would have taken a look sooner since it was so easy to implement.
I understand if you decide against the feature, but I'd really like to have it and would be happy to discuss further if needed!
Hope you're all well! //James
Yeah, I think this is a great feature! I added notes for a few cleanup items. Thanks @James0x57 !
Hey Justin! I've Addressed each item
Here's what the updated expression part in the docs looks like locally now:
Hey fam!
This adds integer count loops to output based on numbers. Most frequently for me I've needed this for heavy visual builds.
I queried about this years ago, wish I would have taken a look sooner since it was so easy to implement.
I understand if you decide against the feature, but I'd really like to have it and would be happy to discuss further if needed!
Hope you're all well! //James