API Reference
The public surface of @artstesh/it-should (v2 line). Everything is exported from the package root; there is no default export.
Exports
Export | What it is |
|---|---|
| the entry function; returns the |
| creates verifiers: |
| base class of all verifiers; provides |
| typed base; provides |
| the verifiers |
| occurrence counters for string/array checks: |
| settings object for |
| type: |
ShouldError (the error type every failed check throws) is intentionally not re-exported — see Caveats. The method verifier that appears in the 1.2.x changelog is not yet public API.
Model
should(): VerifierFactory— the single entry point.Each factory method wraps the examined value in the matching verifier.
Check methods return the verifier (chainable); a failed check throws
ShouldErrorwith a per-check message.notinverts every following check;defined()and the implicitnull/undefinedguard behave as documented in Concepts.
Pages
Page | Covers |
|---|---|
| |
comparisons, ranges, proximity | |
content, case, | |
| |
membership, counts, uniqueness, equality, | |
|