(operator: string, value: unknown, operand: unknown)
| 1097 | isPluginStorageRecord(data) ? data[field] : undefined; |
| 1098 | |
| 1099 | const matchesWhereOperator = (operator: string, value: unknown, operand: unknown): boolean => { |
| 1100 | if (operator === "eq") return comparePluginStorageValues(value, operand) === 0; |
| 1101 | if (operator === "in") { |
| 1102 | return ( |
| 1103 | Array.isArray(operand) && |
| 1104 | operand.some((item) => comparePluginStorageValues(value, item) === 0) |
| 1105 | ); |
| 1106 | } |
| 1107 | if (operator === "gt") return comparePluginStorageValues(value, operand) > 0; |
| 1108 | if (operator === "gte") return comparePluginStorageValues(value, operand) >= 0; |
| 1109 | if (operator === "lt") return comparePluginStorageValues(value, operand) < 0; |
| 1110 | if (operator === "lte") return comparePluginStorageValues(value, operand) <= 0; |
| 1111 | return false; |
| 1112 | }; |
| 1113 | |
| 1114 | const matchesWhereOperators = ( |
| 1115 | value: unknown, |
no test coverage detected