AndOperator
A and operator constraint
import { AndOperator } from "@schukai/monster/source/constraints/andoperator.mjs";A Simple Example
import {Valid} from '@schukai/monster/source/constraints/valid.mjs';
import {Invalid} from '@schukai/monster/source/constraints/invalid.mjs';
import {AndOperator} from '@schukai/monster/source/constraints/andoperator.mjs';
new AndOperator(
new Valid(), new Valid()).isValid()
.then(() => console.log(true))
.catch(() => console.log(false));
// ↦ true
new AndOperator(
new Invalid(), new Valid()).isValid()
.then(() => console.log(true))
.catch(() => console.log(false));
// ↦ falseExported
AndOperatorDerived 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.