Requisito
Description
Conceptually, Requisito is based on clojure's spec. However, it is in no way a one to one port of that api and is therefore free to deviate however it chooses, whether in naming or implementation.
Predicates
All predicates take a single argument value and return a boolean true or false.
@spec predicate( any() ) :: boolean()Conforming
Given a predicate and a value we can check if any particular value conforms to the predicate by using conform/2.
@spec conform( fun(), any() ) :: atom() | any()Validation
If you want a boolean return value you can use valid?/2
@spec valid?( fun() , any() ) :: boolean()Installation
If available in Hex, the package can be installed
by adding requisito to your list of dependencies in mix.exs:
def deps do
[{:requisito, "~> 0.1.0"}]
end