Asserts this spec on a given value. Returns the value if value passes spec,
returns perusal-immutable.invalid
otherwise.
The value to be asserted.
Returns the value if value passes spec, returns perusal-immutable.invalid otherwise.
Explains why a value passes/fails this spec. Prints out the path to this pred if value fails at this pred.
The value to be checked.
The path travelled to this spec.
Returns true if the value satisfies this spec, false otherwise.
Generated using TypeDoc
Class representing
Predicates
, the building block of specs. It is important that your predicates are as simple as possible to aid in debugging, because simple predicates will meaningfully inform exactly what the issue is.