cljs.spec/instrument*

functionremoved v1.9.183added v1.9.14Edit
(instrument* v)

Source code @ clojurescript:src/main/cljs/cljs/spec.cljs
(defn instrument*
  [v]
  (let [spec (get-spec v)]
    (if (fn-spec? spec)
      (locking instrumented-vars
               (let [{:keys [raw wrapped]} (get @instrumented-vars v)
                     current @v]
                 (when-not (= wrapped current)
                   (let [checked (spec-checking-fn v current)]
                     (swap! instrumented-vars assoc v {:raw current :wrapped checked})
                     checked))))
      (throw (no-fn-spec v spec)))))