ifNth arguments seem to be switched
https://github.com/helpers/handlebars-helpers/blob/5d3405f178a9ec4c90df3c7dc07b4faf9a09dfd7/lib/comparison.js#L328
Is there any idea behind switching arguments (b % a) here? Documentation says that
Conditionally renders a block if the remainder is zero when a operand is divided by b.
but logic seems to be inverse. I spent plenty of time trying to figure out why my ifNth is not working as supposed, or I just don't get it.
The following test shows an example of the usage:
https://github.com/helpers/handlebars-helpers/blob/20a2fa1bcbf7817a7814904247319972c2fcd44b/test/comparison.js#L381-L401
I agree that the documentation could be updated to show an example and clear up which is argument is dividing the other. Would you like to do a PR to update the code comments? I think the logic is correct because the usage in the test "feels" more natural to me.
Sure, landed here: https://github.com/helpers/handlebars-helpers/pull/307.