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)))
|
|
|
|
|
2015-03-02 12:06:02 +00:00
|
|
|
(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)))
|