OrOperator
A or operator
import { OrOperator } from "@schukai/monster/source/constraints/oroperator.mjs";A Simple Example
import {Valid} from '@schukai/monster/source/constraints/valid.mjs';
import {Invalid} from '@schukai/monster/source/constraints/invalid.mjs';
import {OrOperator} from '@schukai/monster/source/constraints/oroperator.mjs';
new OrOperator(
new Valid(), new Invalid()).isValid()
.then(() => console.log(true))
.catch(() => console.log(false));
// ↦ true
new OrOperator(
new Invalid(), new Invalid()).isValid()
.then(() => console.log(true))
.catch(() => console.log(false));
// ↦ falseExported
OrOperatorDerived from
AbstractOperatorOptions
The Options listed in this section are defined directly within the class. This class is derived from several parent classes. Therefore, it inherits Options from these parent classes. If you cannot find a specific Options in this list, we recommend consulting the documentation of the AbstractOperator.
Properties
The Properties listed in this section are defined directly within the class. This class is derived from several parent classes. Therefore, it inherits Properties from these parent classes. If you cannot find a specific Properties in this list, we recommend consulting the documentation of the AbstractOperator.
Methods
The methods listed in this section are defined directly within the class. This class is derived from several parent classes. Therefore, it inherits methods from these parent classes. If you cannot find a specific method in this list, we recommend consulting the documentation of the AbstractOperator.
State query methods
isValid(value)value{*}: value
- {Promise}
Static methods
[instanceSymbol]()2.1.0- {symbol}
instanceof operator.Events
This component does not fire any public events. It may fire events that are inherited from its parent classes.