mirror of https://github.com/status-im/reagent.git
Remove old interop code
This commit is contained in:
parent
2e0e369d93
commit
9fee64b1bf
|
@ -78,28 +78,3 @@
|
|||
`(and (fn? ~f)
|
||||
(not (nil? (aget ~f "fvar"))))
|
||||
`(fn? f)))
|
||||
|
||||
|
||||
(defn- kwd [k]
|
||||
(if (keyword? k) (name k) k))
|
||||
|
||||
(defmacro oget
|
||||
([o k]
|
||||
`(aget ~o ~(kwd k)))
|
||||
([o k & ks]
|
||||
`(aget ~o ~@(map kwd (list* k ks)))))
|
||||
|
||||
(defmacro oset
|
||||
([o k v]
|
||||
`(aset ~o ~(kwd k) ~v))
|
||||
([o k1 k2 & ksv]
|
||||
`(aset ~o
|
||||
~@(map kwd (list* k1 k2 (butlast ksv)))
|
||||
~(last ksv))))
|
||||
|
||||
(defmacro odo
|
||||
[o k & args]
|
||||
(let [f (cond (not (vector? k)) (list 'aget o (kwd k))
|
||||
(empty? k) o
|
||||
:else (list* 'aget o (map kwd k)))]
|
||||
(js-call f args)))
|
||||
|
|
Loading…
Reference in New Issue