schema-tools.coerce
coerce
(coerce value schema matcher)(coerce value schema matcher type)Simultaneously coerces and validates a value to match the given schema. If a value can’t be coerced to match the schema, an ex-info is thrown - like schema.core/validate, but with overridable :type, defaulting to :schema-tools.coerce/error.
coercer
(coercer schema matcher)(coercer schema matcher type)Produce a function that simultaneously coerces and validates a value against a schema. If a value can’t be coerced to match the schema, an ex-info is thrown - like schema.core/validate, but with overridable :type, defaulting to :schema-tools.coerce/error.
map-filter-matcher
(map-filter-matcher schema)Creates a matcher which removes all illegal keys from non-record maps.
multi-matcher
(multi-matcher accept-schema accept-value fs)Creates a matcher for (accept-schema schema), reducing value with fs functions if (accept-value value).
or-matcher
(or-matcher & matchers)Creates a matcher where the first matcher matching the given schema is used.