The target value type is float64, but this works just as well with integers.
Additional functions can be added later (e.g. equal_to, less_than). This is nested directly under the number.* tree to mimic the naming convention of the string.* functions. This probably needs to be considered along with #64, which could either be a new set of nested functions (e.g. string.compare.equal_to, number.compare.less_than) or be added to existing functions (e.g., if object.target_key exists, then it overrides value).
How Has This Been Tested?
Added new unit tests.
Types of changes
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
[x] My code follows the code style of this project.
[x] My change requires a change to the documentation.
Description
number_greater_than
inspectorMotivation and Context
This is for comparing a number's value, which is currently only possible using the
string_match
function like this:This inspector is simpler to understand:
The target value type is float64, but this works just as well with integers.
Additional functions can be added later (e.g.
equal_to
,less_than
). This is nested directly under thenumber.*
tree to mimic the naming convention of thestring.*
functions. This probably needs to be considered along with #64, which could either be a new set of nested functions (e.g.string.compare.equal_to
,number.compare.less_than
) or be added to existing functions (e.g., ifobject.target_key
exists, then it overridesvalue
).How Has This Been Tested?
Added new unit tests.
Types of changes
Checklist: