This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns specfn.core | |
(:require [clojure.spec :as s] | |
[clojure.spec.test :as t])) | |
(defn- spec-symbols [s] | |
(->> s | |
(drop 1) | |
(partition-all 2) | |
(map first) | |
(map name) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
firebase.firestore = function(app) {}; | |
firebase.app.App.prototype.firestore = function(app) {}; | |
firebase.firestore.Firestore = function() {}; | |
firebase.firestore.Firestore = {}; | |
firebase.firestore.Firestore.app; | |
firebase.firestore.Firestore.DocumentData; | |
firebase.firestore.Firestore.setLogLevel = function(logLevel) {}; | |
firebase.firestore.Firestore.prototype.batch = function () {}; | |
firebase.firestore.Firestore.prototype.collection = function (collectionPath) {}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;;; Entity wrapper | |
#?(:clj (declare ->EntityMap)) | |
#?(:clj (deftype EntityMap [^datomic.query.EntityMap entity ^boolean ident?] | |
Object | |
(hashCode [this] | |
(.hashCode entity)) | |
(equals [this o] | |
(and (instance? (class this) o) | |
(.equals entity (.entity o)))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def views | |
{:some-view SomeView | |
:another-view AnotherView}) | |
(def factories | |
(map om/factory (vals views))) | |
(defui Router | |
static om/Ident | |
(ident [this {:keys [route]}] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns bs.utils.mock-connection | |
"Utilities for using Datomic" | |
(:require [datomic.api :as d]) | |
(:use clojure.repl clojure.pprint) | |
(:import (java.util.concurrent BlockingQueue LinkedBlockingDeque) | |
(datomic Connection))) | |
(defrecord MockConnection | |
[dbAtom, ^BlockingQueue txQueue] |