Closed Mallika05 closed 3 months ago
Adds number_less_than inspector
number_less_than
Ref: https://github.com/brexhq/substation/pull/183
This is for comparing a number's value, which is currently only possible using the string_match function like this:
sub.cnd.str.match({ object: {source_key: 'FIELD'}, pattern: '^[0-9]{,3}$'}),
This inspector is simpler to understand:
sub.cnd.num.less_than({ object: {source_key: 'FIELD'}, value: 999 }), // < 999
The target value type is float64, but this works just as well with integers.
Added unit tests
Description
Adds
number_less_than
inspectorMotivation and Context
Ref: https://github.com/brexhq/substation/pull/183
This is for comparing a number's value, which is currently only possible using the string_match function like this:
sub.cnd.str.match({ object: {source_key: 'FIELD'}, pattern: '^[0-9]{,3}$'}),
This inspector is simpler to understand:
sub.cnd.num.less_than({ object: {source_key: 'FIELD'}, value: 999 }), // < 999
The target value type is float64, but this works just as well with integers.
How Has This Been Tested?
Added unit tests
Types of changes
Checklist: