Skip to content

Commit

Permalink
trim
Browse files Browse the repository at this point in the history
  • Loading branch information
frenchy64 committed Nov 15, 2024
1 parent 1d520f2 commit 0f5f48c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/malli/core.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -705,8 +705,7 @@
:schema-type (:type constraint-context)})))

(defn -simple-schema [props]
(let [{:keys [type type-properties pred property-pred min max from-ast to-ast compile
constraints-override-property-pred]
(let [{:keys [type type-properties pred property-pred min max from-ast to-ast compile]
:or {min 0, max 0, from-ast -from-value-ast, to-ast -to-type-ast}} props]
(if (fn? props)
(do
Expand Down Expand Up @@ -788,8 +787,7 @@
(defn -nil-schema [] (-simple-schema {:type :nil, :pred nil?}))
(defn -any-schema [] (-simple-schema {:type :any, :pred any?}))
(defn -some-schema [] (-simple-schema {:type :some, :pred some?}))
(defn -string-schema [] (-simple-schema {:type :string, :pred string?, :property-pred (-min-max-pred count)
:constraints-override-property-pred true}))
(defn -string-schema [] (-simple-schema {:type :string, :pred string?, :property-pred (-min-max-pred count)}))
(defn -int-schema [] (-simple-schema {:type :int, :pred int?, :property-pred (-min-max-pred nil)}))
(defn -float-schema [] (-simple-schema {:type :float, :pred float?, :property-pred (-min-max-pred nil)}))
(defn -double-schema [] (-simple-schema {:type :double, :pred double?, :property-pred (-min-max-pred nil)}))
Expand Down

0 comments on commit 0f5f48c

Please sign in to comment.