re-frame/src/re_frame/utils.cljs

14 lines
212 B
Plaintext
Raw Normal View History

2014-12-15 11:56:32 +00:00
(ns re-frame.utils)
2015-02-22 11:28:40 +00:00
(defn warn
[& args]
(.warn js/console (apply str args)))
2014-12-15 11:56:32 +00:00
(defn first-in-vector
[v]
2015-02-22 11:28:40 +00:00
(if (vector? v)
(first v)
(warn "re-frame: expected a vector event, but got: " v)))