Open
Conversation
This update makes binary and logical operators more tolerant of mixed or unknown types, treating them permissively to allow broader type combinations. It also introduces behavior to handle `nil` as a valid operand in various operations (e.g., `nil` treated as `false` or `0` where applicable). Test coverage is expanded significantly with new test cases validating arithmetic, comparison, and mixed-type scenarios.
patch for handling both null cases in add and subtract
This update introduces the `random` function to the builtin package, allowing generation of random integers with one or two arguments for range specification. It includes extensive input validation, type conversion support, and corresponding test coverage for various use cases and edge cases.
Updated nil value handling in comparison functions to standardize behavior by converting nil values to 0 for numeric contexts. Adjusted test cases to align with the updated logic and added safe checks for string-to-numeric conversions, ensuring stricter type validation during comparisons.
Introduced the EqualIn function to handle JavaScript-like equality for "in" operations, specifically for array/slice membership tests. This updates the logic to account for type coercion and special cases, ensuring more robust and consistent behavior.
Introduce comprehensive test cases simulating JavaScript-like functionality in expr, including truthiness, type coercion, equality, array, object, string, function operations, and edge cases. This ensures support and validation for various dynamic behaviors and scenarios commonly used in JavaScript.
These tests cover literals, operators, functions, optional chaining, predicates, and complex expressions. They ensure cases in the Expr language documentation are thoroughly validated for correctness and behavior.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.