Skip to content

Conversation

danielmittelman
Copy link

This pull request changes how the simplify() function works when dealing with expressions that can be simplified even further.

Example 1:

true and true or true

Before the change, this would have evaluated to something like true and (true or (true)). Yet, since this is an expression that can already be simplified to a single literal, it now evaluates to:

true

Example 2:

(5 > 2) or x > 8

Now, when running simplify(), this will evaluate to true or (x > 8). When running simplify({x: 10}), this will evaluate to true.

@silentmatt
Copy link
Owner

This is really cool. I'll take a look at it and try to get this merged for the next release.

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