@jmurphyau, in that addon, wouldnât be more intuitive a helper structured like {{name property/value1 operator property/value2}}? for example {{cp a '===' b}}
I do not think so. The way that ember-truth-helpers works today makes each helper roughly independent (and easy to reason about). Forcing all operations through a single helper (you suggested cp which I assume means âcompareâ) would make things harder to reason about.
Yep, cp was intended to mean compare. I thought this way would be more readable and intuitive. In this post for example, the OPâs first approach was to do exactly what I suggested.
The solutions for the OPâs problem are fairly simple: creating a helper or using an addon should do the job. I donât know what looks so difficult about it . And for your post, I havenât read it all, but since itâs from more than a year ago, you should check the new features that Ember has. Specially if we take into account how quickly it has been evolving
When possible, I believe the âcorrectâ answer is to create a computed that can return the result of the comparison. This doesnât work in things like {{#each}} blocks, and in those cases youâd need some sort of helper or the equality addon.