duster/js/test_cases/helpers_select
2020-06-07 18:52:09 -04:00
..
input1.json Add a test for the select helper. 2020-06-07 16:50:11 -04:00
main.dust Implemented none and any, but I need to implement early termination. 2020-06-07 18:52:09 -04:00
README.md Add a test for the select helper. 2020-06-07 16:50:11 -04:00

Depth

Select blocks can contain any element type inside, just like most blocks. They, however, only apply their select-checking to immediate children. This prevents things like loops with conditionals inside of them.

Early termination

Comparisons are done in-order and only the first matching comparison (eq/ne/gt/gte/lt/lte) is evaluated. All other non-comparison elements inside the select tag are still rendered normally.

Default vs none

Default was deprecated as of dust 1.6.0 and no longer does anything. It was deprecated because it was essentially the same as none except that there could only be one per select block and it had to be placed after all the other conditions to make sure they were all false. None is more flexible.