Closed Mallika05 closed 3 months ago
Adds number_equal_to inspector
number_equal_to
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]{4,}$'}),
This inspector is simpler to understand:
sub.cnd.num.equal_to({ object: {source_key: 'FIELD'}, value: 999 }), // 999
The target value type is float64, but this works just as well with integers.
Description
Adds
number_equal_to
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]{4,}$'}),
This inspector is simpler to understand:
sub.cnd.num.equal_to({ 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?
Types of changes
Checklist: