(defn read-js
[form]
(when-not (or (vector? form) (map? form))
(throw
#?(:clj (RuntimeException.
"JavaScript literal must use map or vector notation")
:cljs (js/Error.
"JavaScript literal must use map or vector notation"))))
(when-not (or (not (map? form))
(every? valid-js-literal-key? (keys form)))
(throw
#?(:clj (RuntimeException.
"JavaScript literal keys must be strings or unqualified keywords")
:cljs (js/Error.
"JavaScript literal keys must be strings or unqualified keywords"))))
(JSValue. form))