forest.coerce
Utils to coerce data between javascript an Clojure utilizing Schema library.
coerce-js
(coerce-js schema js-obj)Coerces a javascript object. Returns Clojure data structure in the shape of the given schema.
coerce-model
(coerce-model schema model)Coerces a model returned by one of foxx repository’s methods. Returns Clojure data structure in the shape of the given schema.
coerce-models
(coerce-models schema models)Coerces an array of models returned by one of foxx repository’s methods. Returns Clojure data structure in the shape of the given schema.