   [fmt & args]
   (apply goog.string/format fmt args))
 
-(defn safe-regex [s & {:keys [:ignore-case?]
-                       :or    {:ignore-case? true}}]
+(defn safe-regex
   "Create a safe (escaped) js regex out of a string.
    By default, creates regex with ignore case option."
+  [s & {:keys [:ignore-case?]
+        :or {:ignore-case? true}}]
   (let [s (.replace s
                     #"/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/"
                     "\\$&")] ;; See http://stackoverflow.com/a/6969486

      (js/RegExp. s "i")
      (js/RegExp. s))))

(defn indexed [coll]
  "Given a seq, produces a two-el seq. [a b c] => [[0 a] [1 b] [2 c]]."
  (map-indexed vector coll))

(defn click-fn [f]
  "Helper function to create a click function that prevents default"
  (fn [event] (.preventDefault event) (f)))

(defn pluralize-number

  (let [last-param (-> url str (split #"/") last)]
    (-> last-param str (split #".json") first)))

(defn json->js
  "Convert json to js using JSON.parse"
  [s]
  (.parse js/JSON s))

(defn json->cljs
  "Convert json string to cljs object.
   Fast, but doesn't preserve keywords."
  [s]
   (js->clj (json->js s)))

(defn json->js->cljs
  "Convert json string to cljs via js.
   Slow method, but preserves keywords, and appropriate for small json."
  [s]
  (js->clj (json->js s) :keywordize-keys true))

(defn format
