Function: isCondition()
isCondition(
value): value is `${string}::eq::${string}` | `${string}::neq::${string}`
Defined in: state/utils.ts:131
Type guard that checks if a value is a valid condition string.
Valid condition strings follow the pattern: dataProp::condition::value
where:
dataPropis alphanumeric with dots and underscoresconditionis alphanumeric with underscoresvaluecan be a quoted string, alphanumeric, or empty
Parameters
value
unknown
The value to check
Returns
value is `${string}::eq::${string}` | `${string}::neq::${string}`
True if the value is a valid condition string, false otherwise
Example
isCondition("user.age::eq::18"); // true
isCondition("user.active::eq::true"); // true
isCondition("invalid"); // false
isCondition(123); // false