Releases: superwall/superscript
Releases · superwall/superscript
1.0.4
1.0.1
1.0.1
Enhancements
- Adds
hasFnfunction that checks for the existance of a function or returnsfalse - Enhance
hasFnandhaschecks to do the following:- If a
device.orcomputed.function is used, or a variable is accessed in an expression - Wrap the accessor in
hasorhasFn - Wrap the evaluation to:
- Evaluate
has/hasFnfirst - if true, run the expression.
- if false and the right side is atomic, we evaluate the default fallback value (
0forint/float,""forString) - if false and the right side is not atomic, we wrap the whole expression to return
false(to avoid error due to comparing different types)
- Evaluate
- If a
- Removes
string.toBool(),string.toInt(),string.toFloat()functions as every possible valid atom conversion is done in the AST
General
- Adds more tests, improves test coverage, adds displaying coverage badge
- Improves
README.MDand adds aninterpretation-flow.mdto serve as a guide for how things are interpreted
1.0.0
1.0.0
Enhancements
- Adds truthiness and string normalization so value such as "true", "false", "1.1" etc are treated as true, false, 1.1. This occurs on both left and right side of an expression.
- Adds conversion methods
bool.toString(),float.toString(),int.toString(),bool.toString()andstring.toBool(),string.toInt(),string.toFloat()to enable typecasting in CEL
Truthiness
- Fixes issues with undeclared references for properties by wrapping them in a has(x)? x : Null tertiary expression
0.2.8
0.2.7
0.2.0
0.1.12
0.1.11
0.1.10
0.1.9
0.1.9
Enhancements
- Added returning of a JSON encoded
Result<PassableValue,String>from the exposed methods instead of relying on panics.
Example JSON:- Error:
{"Err":"No such key: should_display"} - Ok:
{"Ok":{"type":"bool","value":true}}
- Error:
Fixes
- Fixed a bug where getting properties from
devicewould panic whendevicefunctions were defined