mirror of https://github.com/status-im/reagent.git
Use implements? everywhere for consistency
This commit is contained in:
parent
754aeee5ad
commit
99aeb989c8
|
@ -17,8 +17,7 @@
|
||||||
;;; Common utilities
|
;;; Common utilities
|
||||||
|
|
||||||
(defn hiccup-tag? [x]
|
(defn hiccup-tag? [x]
|
||||||
(or (keyword? x)
|
(or (implements? INamed x)
|
||||||
(symbol? x)
|
|
||||||
(string? x)))
|
(string? x)))
|
||||||
|
|
||||||
(defn valid-tag? [x]
|
(defn valid-tag? [x]
|
||||||
|
@ -44,14 +43,14 @@
|
||||||
(when (.hasOwnProperty o k)
|
(when (.hasOwnProperty o k)
|
||||||
(aget o k)))
|
(aget o k)))
|
||||||
|
|
||||||
(defn cached-prop-name [x]
|
(defn cached-prop-name [k]
|
||||||
(if (or (string? x)
|
(if (or (string? k)
|
||||||
(not (implements? INamed x)))
|
(not (implements? INamed k)))
|
||||||
x
|
k
|
||||||
(if-let [s (obj-get prop-name-cache (name x))]
|
(if-let [k' (obj-get prop-name-cache (name k))]
|
||||||
s
|
k'
|
||||||
(aset prop-name-cache (name x)
|
(aset prop-name-cache (name k)
|
||||||
(util/dash-to-camel x)))))
|
(util/dash-to-camel k)))))
|
||||||
|
|
||||||
(defn convert-prop-value [x]
|
(defn convert-prop-value [x]
|
||||||
(cond (string? x) x
|
(cond (string? x) x
|
||||||
|
|
Loading…
Reference in New Issue