re-frame/src/re_frame/utils.cljs

29 lines
456 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)))
(defn dbg
[& args]
(.debug js/console (apply str args)))
(defn log
[& args]
(.log js/console (apply str args)))
(defn group
[& args]
(.group js/console (apply str args)))
(defn groupEnd
[]
(.groupEnd js/console))
2015-02-22 11:28:40 +00:00
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)))