-
-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding Numeric Comparison Operators to Templates #561
Adding Numeric Comparison Operators to Templates #561
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, please! 🙏
- The proposed version of those helpers mimic the behavior of the `<` and `>` operators in Javascript. While this is the | ||
least surprising thing to do, one could argue that we could add extra logic to protect users from the usual pitfalls | ||
and edge cases of those operators, **like throwing exceptions if any of the values is `NaN` or a value other than a number**. | ||
- We must decide if it's worth adding `{{lte}}` and `{{gte}}` helpers, equivalent to `<=` and `>=` respectively. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I would prefer having them supported too
👋 Just a quick update here. We discussed this in todays core team meeting, and are generally in favor. We also strongly that Basically, the question is, should We plan to discuss this with the GlimmerVM team and again at next weeks core team meeting, hopefully I'll have another update for folks next week. |
362e723
to
481b643
Compare
Equivalent of <arg1> < <arg2> | ||
This is identical to the `{{lt}}` helper in `ember-truth-helpers` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Equivalent of <arg1> < <arg2> | |
This is identical to the `{{lt}}` helper in `ember-truth-helpers` | |
Equivalent of `<arg1> < <arg2>`. | |
This is identical to the `{{lt}}` helper in `ember-truth-helpers`. |
Equivalent of <arg1> <= <arg2> | ||
This is identical to the `{{lte}}` helper in `ember-truth-helpers` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Equivalent of <arg1> <= <arg2> | |
This is identical to the `{{lte}}` helper in `ember-truth-helpers` | |
Equivalent of `<arg1> <= <arg2>`. | |
This is identical to the `{{lte}}` helper in `ember-truth-helpers`. |
We discussed this at todays core team meeting, and with @pzuraq's recent updates (adding @locks - Is going to update some materials for "How we teach this" (that will have to be done prior to merging), but we don't think it will be an issue for the final comment period itself. |
Co-authored-by: Matthew Beale <[email protected]>
has this landed? |
Extracted from RFC #388
Rendered