re-frame/src/re_frame/utils.cljs

12 lines
191 B
Plaintext
Raw Normal View History

2015-05-02 00:47:37 +00:00
(ns re-frame.utils
(:require
2016-06-24 12:09:07 +00:00
[re-frame.loggers :refer [error]]))
2014-12-15 11:56:32 +00:00
(defn first-in-vector
2014-12-15 11:56:32 +00:00
[v]
2015-02-22 11:28:40 +00:00
(if (vector? v)
(first v)
2016-05-29 12:48:18 +00:00
(error "re-frame: expected a vector, but got: " v)))
2015-04-26 21:38:37 +00:00