(any-cardinality spec & {:keys [coerce-many]})
Given a spec, returns a version of that spec that conforms to any
cardinality. Returns the conformed value from the spec
unchanged. Optional kwarg :coerce-many
coerces values to
cardinality many.
Given a spec, returns a version of that spec that conforms to any cardinality. Returns the conformed value from the spec unchanged. Optional kwarg `:coerce-many` coerces values to cardinality many.
(any-cardinality-conformed spec)
Given a spec, returns a version of that spec that conforms to any cardinality. Just like an or spec, the returned conformed value will be a [type form] pair.
Given a spec, returns a version of that spec that conforms to any cardinality. Just like an or spec, the returned conformed value will be a [type form] pair.
(cardinality-many spec)
Given a spec, returns a version that conforms to cardinality many arguments.
Given a spec, returns a version that conforms to cardinality many arguments.
(cardinality-many? x)
(conform-to spec f)
Given a spec, returns a version of that spec that additionally applies f to the conformed value.
Given a spec, returns a version of that spec that additionally applies f to the conformed value.
(non-conformer spec)
Returns a version of the given spec that checks but does not conform
the value. Handles errors within the spec
transparently.
Returns a version of the given spec that checks but does not conform the value. Handles errors within the `spec` transparently.
(parse spec x)
Given a spec and a value, x, conforms x, or throws an error if x does not conform to the spec. Different from clojure.spec.alpha/assert, which does not conform the return value.
Given a spec and a value, x, conforms x, or throws an error if x does not conform to the spec. Different from clojure.spec.alpha/assert, which does not conform the return value.
(spec? spec)
Returns true if spec
is a valid spec. Note that this is not the
same thing as clojure.spec.alpha/spec?
, which only returns true if
spec
is a valid spec object.
Returns true if `spec` is a valid spec. Note that this is not the same thing as `clojure.spec.alpha/spec?`, which only returns true if `spec` is a valid spec object.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close