 (ns konserve.filestore
-  (:require [cljs.nodejs :as node]
-            [konserve.core :as k]
-            [hasch.core :refer [uuid]]
-            [fressian-cljs.core :as fress]
-            [konserve.serializers :as ser]
-            [konserve.protocols :refer [PEDNAsyncKeyValueStore -exists? -get-in -update-in -assoc-in -dissoc
-                                        PJSONAsyncKeyValueStore -jget-in -jassoc-in -jupdate-in
-                                        PBinaryAsyncKeyValueStore -bget -bassoc
-                                        -serialize -deserialize]]
-            [cljs.core.async :as async :refer (take! <! >! put! take! close! chan poll!)])
+  (:require
+   [cljs.nodejs :as node]
+   [konserve.core :as k]
+   [hasch.core :refer [uuid]]
+   [incognito.edn :refer [read-string-safe]]
+   [konserve.serializers :as ser]
+   [fress.api :as fress]
+   [konserve.protocols :refer [PEDNAsyncKeyValueStore -exists? -get-in -update-in -assoc-in -dissoc
+                               PJSONAsyncKeyValueStore -jget-in -jassoc-in -jupdate-in
+                               PBinaryAsyncKeyValueStore -bget -bassoc
+                               -serialize -deserialize]]
+   [incognito.transit :refer [incognito-read-handler
+                              incognito-write-handler]]
+   [cognitect.transit :as transit]
+   [cljs.core.async :as async :refer (take! <! >! put! take! close! chan poll!)]
+   [cljs.tools.reader.impl.inspect :as i])
   (:require-macros [cljs.core.async.macros :refer [go go-loop]]))
 
 ;; TODO serializer

        (close! res-ch)))
    res-ch))

(defn read-edn [path key]
  (let [file-name (str path "/data/" (uuid key))
        res-ch    (chan)]
    (if (.existsSync fs file-name)

      (close! res-ch))
    res-ch))

(defn read-edn-key [serializer read-handlers path key]
  (let [file-name (str path "/meta/" key)
        res-ch    (chan)]
    (if (.existsSync fs file-name)
