Skip to content
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

Implement comparison expressions in if and unless #7

Closed
askonomm opened this issue Oct 13, 2024 · 1 comment · Fixed by #8
Closed

Implement comparison expressions in if and unless #7

askonomm opened this issue Oct 13, 2024 · 1 comment · Fixed by #8
Assignees
Labels
enhancement New feature or request

Comments

@askonomm
Copy link
Owner

askonomm commented Oct 13, 2024

So that something like this could be possible:

<div x:if="age > 30"></div>

or even

<div x:if "age >= allowedAge"></div>

To be able to compare between multiple vars.

Things to support could be:

  • >
  • <
  • ==
  • >=
  • <=
@askonomm askonomm added the enhancement New feature or request label Oct 13, 2024
@askonomm askonomm changed the title Implement comparison operators in if and unless Implement comparison expressions in if and unless Oct 13, 2024
@askonomm
Copy link
Owner Author

Could be cool if this could also support and and or, as well as parentheses for nested expressions, e.g

age >= (baseAge + 10) and userRole == 'user'

@askonomm askonomm self-assigned this Oct 16, 2024
@askonomm askonomm linked a pull request Oct 17, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant