(operator: string, value: unknown, operand: unknown)
| 1106 | isPluginStorageRecord(data) ? data[field] : undefined; |
| 1107 | |
| 1108 | const matchesWhereOperator = (operator: string, value: unknown, operand: unknown): boolean => { |
| 1109 | if (operator === "eq") return comparePluginStorageValues(value, operand) === 0; |
| 1110 | if (operator === "in") { |
| 1111 | return ( |
| 1112 | Array.isArray(operand) && |
| 1113 | operand.some((item) => comparePluginStorageValues(value, item) === 0) |
| 1114 | ); |
| 1115 | } |
| 1116 | if (operator === "gt") return comparePluginStorageValues(value, operand) > 0; |
| 1117 | if (operator === "gte") return comparePluginStorageValues(value, operand) >= 0; |
| 1118 | if (operator === "lt") return comparePluginStorageValues(value, operand) < 0; |
| 1119 | if (operator === "lte") return comparePluginStorageValues(value, operand) <= 0; |
| 1120 | return false; |
| 1121 | }; |
| 1122 | |
| 1123 | const matchesWhereOperators = ( |
| 1124 | value: unknown, |
no test coverage detected