   (assert (= 1 (count local-storage)))
   (assert (contains? local-storage {:foo :bar}))
   (assert (= 0 (count session-storage)))
+
+  (def val {:bar 42 :timestamp {:bar (js/Date.) :baz :safd :frob #{1 2 3}}})
+  (assoc! local-storage :foo val)
+  (assert (= val (get local-storage :foo)))
+
+  (assoc! local-storage val :foo)
+  (assert (= :foo (get local-storage val)))
+
+  (def date (js/Date.))
+  (assoc! local-storage :date date)
 )

         not-found)))
)

(defn clear! [storage] (.clear storage))

(comment
  (clear! local-storage)
  (clear! session-storage)


  (:require [cljs.reader :as reader]))

(enable-console-print!)
(set! *print-readably* false)

(def local-storage js/localStorage)
(def session-storage js/sessionStorage)

(def serialize pr-str)

(def deserialize reader/read-string)

(defn clear! [storage] (.clear storage))

(extend-type js/Storage
  ICounted
