                                  :onNode        on-node?
                                  :createStage   createStage
                                  :newMemStore   newMemStore
+                                 :LWWR #js {:createLWWR createLWWR
+                                            :streamIntoIdentity streamLWWRIntoIdentity
+                                            :setRegister setRegister}
                                  :ORMap         #js {:createORMap        createORMap
-                                                     :streamIntoIdentity streamIntoIdentity
+                                                     :streamIntoIdentity streamORMapIntoIdentity
                                                      :associate          associate}
                                  :clientConnect client-connect!
                                  :createUUID    cljs.core/uuid

         (reduce (fn [m [k v]] (assoc m k v)) {}))))


(defn ^:export streamIntoIdentity [stage user crdt-id stream-eval-fns target]
  (ormap-realize/stream-into-identity! stage [user crdt-id] (eval-fns->js stream-eval-fns) target))


(defn ^:export createUUID [s]
  (cljs.core/uuid s))

  "Experimental JavaScript API."
  (:require [replikativ.peer :as peer]
            [replikativ.stage :as stage]
            [replikativ.crdt.lwwr.stage :as lwwr-stage]
            [replikativ.crdt.ormap.stage :as ormap-stage]
            [goog.net.WebSocket]
            [goog.Uri]
            [goog.events]
            [replikativ.crdt.ormap.realize :as ormap-realize]
            [replikativ.crdt.lwwr.realize :as lwwr-realize]
            [konserve.memory :as mem]
            [kabel.client :refer [client-connect!]]
            [cljs.core.async :refer [chan take! <! >!]]
            [superv.async :refer [S]]
            [taoensso.timbre :as timbre]
            [replikativ.crdt.lwwr.core :as lwwr]
            [replikativ.crdt.ormap.core :as ormap])
  (:require-macros [superv.async :refer [go-loop-try go-try]]))

