cljs.spec/explain-data

MOVED, please see cljs.spec.alpha/explain-data
functionremoved v1.9.542added v1.9.14Edit
(explain-data spec x)

Source docstring:
Given a spec and a value x which ought to conform, returns nil if x
conforms, else a map with at least the key ::problems whose value is
a collection of problem-maps, where problem-map has at least :path :pred and :val
keys describing the predicate and the value that failed at that
path.
Source code @ clojurescript:src/main/cljs/cljs/spec.cljs
(defn explain-data
  [spec x]
  (explain-data* spec [] (if-let [name (spec-name spec)] [name] []) [] x))