Provides common validation functions.
- Source:
Methods
-
<static> assert()
Boolean → Divergence → Object → Validation[Divergence, Divergence]
-
Makes an assertion about a piece of data.
This is a low-level method, and should be only used as a basis for constructing higher-level validations, not as a validation itself.
- Source:
-
<static> contain()
α → Sequence[α] → Validation[Divergence, Divergence]
-
Asserts that a contains something as a value.
- Source:
-
<static> equal()
α → β → Validation[Divergence, Divergence]
-
Asserts structural (deep) equality between two values.
- Source:
-
<static> have()
String → Object → Validation[Divergence, Divergence]
-
Asserts that a value has a certain property.
- Source:
-
<static> haveClass()
String → α → Validation[Divergence, Divergence]
-
Asserts that something has a certain internal
[[Class]].- Source:
-
<static> haveType()
String → α → Validation[Divergence, Divergence]
-
Asserts that something is of a certain type (according to
typeof).- Source:
-
<static> inheritFrom()
Object → Object → Validation[Divergence, Divergence]
-
Asserts that something has another thing in its prototype chain.
- Source:
-
<static> match()
RegExp → String → Validation[Divergence, Divergence]
-
Asserts that a value matches a regular expression.
- Source:
-
<static> not()
(α → Validation[Divergence, Divergence]) → α → Validation[Divergence, Divergence]
-
Negates an assertion function.
- Source:
-
<static> ok()
α → Validation[Divergence, Divergence]
-
Asserts that something is truthy.
- Source:
-
<static> raise()
Error → (Void → Void :: partial) → Validation[Divergence, Divergence]
-
Asserts that a computation throws a particular exception.
- Source:
-
<static> strictEqual()
α → β → Validation[Divergence, Divergence]
-
Asserts strict equality (===) between two values.
- Source: