cljs.spec/conformer

MOVED, please see cljs.spec.alpha/conformer
macroremoved v1.9.542added v1.9.14Edit
(conformer f)
(conformer f unf)

Source docstring:
takes a predicate function with the semantics of conform i.e. it should return either a
(possibly converted) value or :cljs.spec/invalid, and returns a
spec that uses it as a predicate/conformer. Optionally takes a
second fn that does unform of result of first
Source code @ clojurescript:src/main/cljs/cljs/spec.cljc
(defmacro conformer
  ([f] `(spec-impl '(conformer ~(res &env f)) ~f nil true))
  ([f unf] `(spec-impl '(conformer ~(res &env f) ~(res &env unf)) ~f nil true ~unf)))