             [inflections.core :refer [plural]]
             [discuss.config :as config]
             [discuss.parser :as parser]
-            [discuss.utils.logging :as log]))
+            [discuss.utils.logging :as log]
+            [clojure.string :as string]
+            [cemerick.url :as url]))
 
 (defn prefix-name
   "Create unique id for DOM elements."

  :args (s/cat :s string?)
  :ret string?)

(defn log
  "Print argument as JS object to be accessible from the console."
  [arg]

  :args (s/cat :col coll? :namespace any?)
  :ret coll?)

(defn parse-query-parameter
  "Provide a key which should be parsed from the URL. Return nil if key was not
  found."
  [query-parameter]
  (get (:query (url/url (-> js/window .-location .-href)))
       query-parameter))
(s/fdef parse-query-parameter
  :args (s/cat :query-parameter string?)
  :ret (s/? string?))

;; -----------------------------------------------------------------------------
;; Configuration Settings
