(operator: string, value: unknown, operand: unknown)
| 859 | isPluginStorageRecord(data) ? data[field] : undefined; |
| 860 | |
| 861 | const matchesWhereOperator = (operator: string, value: unknown, operand: unknown): boolean => { |
| 862 | if (operator === "eq") return comparePluginStorageValues(value, operand) === 0; |
| 863 | if (operator === "in") { |
| 864 | return ( |
| 865 | Array.isArray(operand) && |
| 866 | operand.some((item) => comparePluginStorageValues(value, item) === 0) |
| 867 | ); |
| 868 | } |
| 869 | if (operator === "gt") return comparePluginStorageValues(value, operand) > 0; |
| 870 | if (operator === "gte") return comparePluginStorageValues(value, operand) >= 0; |
| 871 | if (operator === "lt") return comparePluginStorageValues(value, operand) < 0; |
| 872 | if (operator === "lte") return comparePluginStorageValues(value, operand) <= 0; |
| 873 | return false; |
| 874 | }; |
| 875 | |
| 876 | const matchesWhereOperators = ( |
| 877 | value: unknown, |
no test coverage detected