predictype / booleans / booleanState
booleanState(
source
,oper
):boolean
Defined in: predicates/booleans/booleanState.ts:24
Checks the state of a boolean value (true or false) using the specified operation.
boolean
The boolean value to check.
The operation to perform (e.g. ‘is_true’, ‘is_false’).
boolean
True if the state check is valid according to the operator, otherwise false.
If the operation is not recognized.
const valueTrue = true;
const valueFalse = false;
booleanState(valueTrue, 'is_true'); // true
booleanState(valueFalse, 'is_false'); // true
Supported Operators: