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

chore(jsonlogic): Modified the logic to evaluate 'and' & 'or' lazily #92

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

cupofcat
Copy link
Contributor

No description provided.

@cupofcat
Copy link
Contributor Author

Hi @diegoholiveira I would like to kindly ask you to review this PR. "AND" and "OR" operators do not necessarily need to evaluate all the values, if one of the non-last values already evaluates to falsey/truthy. This is good for performance but also does not require the user to provide data (vars) for all the branches of JSONLogic, if they know that the evaluation can terminate earlier.

@diegoholiveira diegoholiveira merged commit 659feac into diegoholiveira:main Dec 16, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants