wingbot 3.38.0-alpha.1 → 3.38.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -119,11 +119,17 @@ const compare = (variable, operator, value = undefined) => {
|
|
|
119
119
|
return isStringNumber(variable) ? !toNumber(variable) : !variable;
|
|
120
120
|
case ConditionOperators.contains:
|
|
121
121
|
if (typeof variable === 'string') {
|
|
122
|
-
if (isSimpleWord(value))
|
|
123
|
-
|
|
122
|
+
if (isSimpleWord(value)) {
|
|
123
|
+
return webalize(variable).includes(webalize(`${value}`));
|
|
124
|
+
}
|
|
125
|
+
return variable.toLocaleLowerCase().includes(`${value}`.toLocaleLowerCase());
|
|
124
126
|
}
|
|
125
127
|
|
|
126
|
-
|
|
128
|
+
if (variable === null || variable === undefined) {
|
|
129
|
+
return ['null', 'undefined', ''].includes(`${value}`);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
return `${variable}`.includes(`${value}`);
|
|
127
133
|
|
|
128
134
|
case ConditionOperators['not contains']:
|
|
129
135
|
return !compare(variable, ConditionOperators.contains, value);
|