diff --git a/support/src/figwheel/client/utils.clj b/support/src/figwheel/client/utils.clj index 62288be4..8e4c0e82 100644 --- a/support/src/figwheel/client/utils.clj +++ b/support/src/figwheel/client/utils.clj @@ -18,3 +18,8 @@ (defmacro dev-assert [& body] `(dev ~@(map (fn [pred-stmt] `(assert ~pred-stmt)) body))) + +(defmacro feature? + [obj feature] + `(and (cljs.core/exists? ~obj) + (cljs.core/exists? (cljs.core/aget ~obj ~feature)))) diff --git a/support/src/figwheel/client/utils.cljs b/support/src/figwheel/client/utils.cljs index 831292da..12950d15 100644 --- a/support/src/figwheel/client/utils.cljs +++ b/support/src/figwheel/client/utils.cljs @@ -7,7 +7,8 @@ [goog.userAgent.product :as product]) (:import [goog] [goog.async Deferred] - [goog.string StringBuffer])) + [goog.string StringBuffer]) + (:require-macros [figwheel.client.utils :refer [feature?]])) ;; don't auto reload this file it will mess up the debug printing @@ -110,12 +111,6 @@ deferred coll) (fn [_] (.succeed Deferred @results))))) - -(defn- feature? [obj feature] - (and (exists? obj) - (exists? (aget obj feature)))) - - ;; persistent storage of configuration keys (defonce local-persistent-config