Merge branch 'develop' of https://github.com/Day8/re-frame into develop

This commit is contained in:
mike-thompson-day8 2015-03-04 17:13:13 +11:00
commit c88ad9feb4
2 changed files with 20 additions and 2 deletions

View File

@ -3,7 +3,8 @@
[org.clojure/clojurescript "0.0-2816"]
[reagent "0.5.0-alpha3"]
[figwheel "0.2.3-SNAPSHOT"]
[re-frame "0.2.0"]]
[re-frame "0.2.0"]
[prismatic/schema "0.3.7"]]
:plugins [[lein-cljsbuild "1.0.4"]
[lein-figwheel "0.2.3-SNAPSHOT"]]

View File

@ -1,7 +1,24 @@
(ns todomvc.db)
(ns todomvc.db
(:require
[schema.core :as s :include-macros true]))
(def default-initial-state
{:todos (sorted-map) ;; todo ids are the keys (for sort)
:showing :all ;; one of :all :done or :active
})
(def schema
{:todos (s/both (s/pred map?) (s/pred sorted?))
:showing (s/enum :all :done :active)
})
(defn valid-schema?
[db]
(s/validate schema db))