{
operator: "equal",
lhs: 1,
rhs: 1
}
- Conditions can include sets of
anyorall - A condition may specify an
operator - If an
operatoris specified, thelhsandrhsproperties must exist
- An operator specification can be a string representing an
operatorname - An operator specification can be an object with a single property of
not. The value of thenotproperty is the actual operator. - Operators can include a property on the
conditionnamedinfowhich can contain extra info about the evaluation of the operator.
{
operator: {
not : "equal"
},
lhs: 1,
rhs: 1
}
equalgreatherThanlessThanin- Tests if a single value or a sebset of values in thelhsexist in therhsregex- Tests if the regex pattern inlhsmatches the value ofrhs. Remember to double escape\\special characters in the double quoted string. Theregexoperator will also output any strings captured from the evaluation in theinfoproperty
All condition operations use values to evaluate the condition. The lhs
and rhs value specifications are those values.
- A value can be a constant
- A value can have a path specification.
pathspecifications use thelodashlibrary for path resolution using_.get. - A value can be an exists specification.
existsspecifications use thelodashlibrary for path resolution using_.has.
{
operator: {
not : "equal"
},
lhs: {
path: "prop1.prop2"
},
rhs: 1
}
{
operator: "equal",
lhs: {
exists: "prop1.prop2"
},
rhs: true
}
A condition can include an optional depends attribute which must either be a single string or an array of strings.
A dependent string value will be evaluated against any other conditions who included an optional id property in the
condition statement.