(operator: string, value: unknown, operand: unknown)
| 1136 | isPluginStorageRecord(data) ? data[field] : undefined; |
| 1137 | |
| 1138 | const matchesWhereOperator = (operator: string, value: unknown, operand: unknown): boolean => { |
| 1139 | if (operator === "eq") return comparePluginStorageValues(value, operand) === 0; |
| 1140 | if (operator === "in") { |
| 1141 | return ( |
| 1142 | Array.isArray(operand) && |
| 1143 | operand.some((item) => comparePluginStorageValues(value, item) === 0) |
| 1144 | ); |
| 1145 | } |
| 1146 | if (operator === "gt") return comparePluginStorageValues(value, operand) > 0; |
| 1147 | if (operator === "gte") return comparePluginStorageValues(value, operand) >= 0; |
| 1148 | if (operator === "lt") return comparePluginStorageValues(value, operand) < 0; |
| 1149 | if (operator === "lte") return comparePluginStorageValues(value, operand) <= 0; |
| 1150 | return false; |
| 1151 | }; |
| 1152 | |
| 1153 | const matchesWhereOperators = ( |
| 1154 | value: unknown, |
no test coverage detected