diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 6e5b056..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-/target
-/classes
-/checkouts
-pom.xml
-pom.xml.asc
-*.jar
-*.class
-/.lein-*
-/.nrepl-port
-/*-init.clj
-/doc/dist
-/out
-/repl
-/node_modules
-/settings.xml
-/.cpcache
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
deleted file mode 100644
index e6444d8..0000000
--- a/CHANGELOG.md
+++ /dev/null
@@ -1,41 +0,0 @@
-# Changelog #
-
-## Version 1.3.0 ##
-
-Date: 2018-06-02
-
-- Fix message formatting.
-
-
-## Version 1.2.0 ##
-
-Date: 2017-01-11
-
-- Allow `number-str` and `integer-str` receive already coerced values.
-- Minor code cleaning.
-- Update dependencies.
-
-## Version 1.1.0 ##
-
-Date: 2017-08-16
-
-- Add count validators.
-- Update cuerdas to 2.0.3
-
-
-## Version 1.0.0 ##
-
-Date: 2016-06-24
-
-- Add support for neested data structures.
-- Add fast skip already validated and failed paths (performance improvement).
-- BREAKING CHANGE: the errors are now simple strings. No additional list
- wrapping is done anymore. Because the design of the library is just fail
- fast and only one error is allowed.
-
-
-## Version 0.1.0 ##
-
-Date: 2016-04-19
-
-Initial version.
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
deleted file mode 100644
index fda3591..0000000
--- a/CONTRIBUTING.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# Contributed Code #
-
-In order to keep *struct* completely free and unencumbered by copyright, all new
-contributors to the *struct* code base are asked to dedicate their contributions to
-the public domain. If you want to send a patch or enhancement for possible inclusion
-in the *struct* source tree, please accompany the patch with the following
-statement:
-
- The author or authors of this code dedicate any and all copyright interest
- in this code to the public domain. We make this dedication for the benefit of
- the public at large and to the detriment of our heirs and successors. We
- intend this dedication to be an overt act of relinquishment in perpetuity of
- all present and future rights to this code under copyright law.
diff --git a/README.md b/README.md
deleted file mode 100644
index a7672d4..0000000
--- a/README.md
+++ /dev/null
@@ -1,7 +0,0 @@
-# struct #
-
-A structural validation library for Clojure(Script).
-
-[](http://clojars.org/funcool/struct)
-
-Documentation: http://funcool.github.io/struct/latest/
diff --git a/UNLICENSE b/UNLICENSE
deleted file mode 100644
index 00d2e13..0000000
--- a/UNLICENSE
+++ /dev/null
@@ -1,24 +0,0 @@
-This is free and unencumbered software released into the public domain.
-
-Anyone is free to copy, modify, publish, use, compile, sell, or
-distribute this software, either in source code form or as a compiled
-binary, for any purpose, commercial or non-commercial, and by any
-means.
-
-In jurisdictions that recognize copyright laws, the author or authors
-of this software dedicate any and all copyright interest in the
-software to the public domain. We make this dedication for the benefit
-of the public at large and to the detriment of our heirs and
-successors. We intend this dedication to be an overt act of
-relinquishment in perpetuity of all present and future rights to this
-software under copyright law.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-For more information, please refer to
\ No newline at end of file
diff --git a/deps.edn b/deps.edn
deleted file mode 100644
index df1ac4f..0000000
--- a/deps.edn
+++ /dev/null
@@ -1,20 +0,0 @@
-{:deps {funcool/cuerdas {:mvn/version "2.2.0"}}
- :paths ["src"]
- :aliases
- {:dev
- {:extra-deps {org.clojure/clojurescript {:mvn/version "1.10.516"}
- ;; org.clojure/clojure {:mvn/version "1.10.0"}
- com.bhauman/rebel-readline-cljs {:mvn/version "0.1.4"}
- com.bhauman/rebel-readline {:mvn/version "0.1.4"}
- com.bhauman/figwheel-main {:mvn/version "0.2.0"}
- eftest/eftest {:mvn/version "0.5.7"}}
- :extra-paths ["test"]}
-
- :ancient {:main-opts ["-m" "deps-ancient.deps-ancient"]
- :extra-deps {deps-ancient {:mvn/version "RELEASE"}}}
-
- :jar {:extra-deps {seancorfield/depstar {:mvn/version "RELEASE"}}
- :main-opts ["-m" "hf.depstar.jar"]}
-
- :repl {:main-opts ["-m" "rebel-readline.main"]}
- }}
diff --git a/doc/Makefile b/doc/Makefile
deleted file mode 100644
index be1f227..0000000
--- a/doc/Makefile
+++ /dev/null
@@ -1,13 +0,0 @@
-all: doc
-
-api:
- cd ..
- lein doc
-
-doc:
- mkdir -p dist/latest/
- asciidoctor -a docinfo -a stylesheet! -o dist/latest/index.html content.adoc
-
-github: doc api
- ghp-import -m "Generate documentation" -b gh-pages dist/
- git push origin gh-pages
diff --git a/doc/content-docinfo.html b/doc/content-docinfo.html
deleted file mode 100644
index a16e8f9..0000000
--- a/doc/content-docinfo.html
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/doc/content.adoc b/doc/content.adoc
deleted file mode 100644
index 2f51d44..0000000
--- a/doc/content.adoc
+++ /dev/null
@@ -1,387 +0,0 @@
-= struct - validation library for Clojure(Script)
-:toc: left
-:!numbered:
-:idseparator: -
-:idprefix:
-:sectlinks:
-:source-highlighter: pygments
-:pygments-style: friendly
-
-
-== Introduction
-
-A structural validation library for Clojure and ClojureScript.
-
-Highlights:
-
-- *No macros*: validators are defined using plain data.
-- *Dependent validators*: the ability to access to already validated data.
-- *Coercion*: the ability to coerce incoming values to other types.
-- *No exceptions*: no exceptions used in the validation process.
-
-Based on similar ideas of
-link:https://github.com/leonardoborges/bouncer[bouncer].
-
-
-=== Project Maturity
-
-Since _struct_ is a young project there may be some API breakage.
-
-
-=== Install
-
-Just include that in your dependency vector on *_project.clj_*:
-
-[source,clojure]
-----
-[funcool/struct "1.3.0"]
-----
-
-
-== User guide
-
-=== Quick Start
-
-Let's require the main _struct_ namespace:
-
-[source, clojure]
-----
-(require '[struct.core :as st])
-----
-
-Define a small schema for the example purpose:
-
-[source, clojure]
-----
-(def +scheme+
- {:name [st/required st/string]
- :year [st/required st/number]})
-----
-
-You can observe that it consists in a simple map when you declare keys and
-corresponding validators for that key. A vector as value allows us to put
-more than one validator for the same key. If you have only one validator for the
-key, you can omit the vector and put it as single value.
-
-The same schema can be defined using vectors, if the order of validation
-matters:
-
-[source, clojure]
-----
-(def +scheme+
- [[:name st/required st/string]
- [:year st/required st/number]])
-----
-
-By default, all validators are optional so if the value is missing, no error
-will reported. If you want make the value mandatory, you should use a specific
-`required` validator.
-
-And finally, start validating your data:
-
-[source, clojure]
-----
-(-> {:name "Blood of Elves" :year 1994}
- (st/validate +scheme+))
-;; => [nil {:name "Blood of Elves" :year 1994}]
-
-(-> {:name "Blood of Elves" :year "1994"}
- (st/validate +scheme+))
-;; => [{:year "must be a number"} {:name "Blood of Elves", :year "1994"}]
-
-(-> {:year "1994"}
- (st/validate +scheme+))
-;; => [{:name "this field is mandatory", :year "must be a number"} {}]
-----
-
-If only want to know if some data is valid or not, you can use the `valid?` predicate
-for that purpose:
-
-[source, clojure]
-----
-(st/valid? {:year "1994"} +scheme+)
-;; => false
-----
-
-The additional entries in the map are not stripped by default, but this behavior
-can be changed passing an additional flag as the third argument:
-
-[source, clojure]
-----
-(-> {:name "Blood of Elves" :year 1994 :foo "bar"}
- (st/validate +scheme+))
-;; => [nil {:name "Blood of Elves" :year 1994 :foo "bar"}]
-
-(-> {:name "Blood of Elves" :year 1994 :foo "bar"}
- (st/validate +scheme+ {:strip true}))
-;; => [nil {:name "Blood of Elves" :year 1994}]
-
-----
-
-With similar syntax you can validate neested data structures, specifying in the
-key part the proper path to the neested data structure:
-
-[source, clojure]
-----
-(def +scheme+
- {[:a :b] st/integer
- [:c :d] st/string})
-
-(-> {:a {:b "foo"} {:c {:d "bar"}}}
- (st/validate +scheme+))
-;; => [{:a {:b "must be a number"}} {:c {:d "bar"}}]
-----
-
-
-=== Parametrized validators
-
-In addition to simple validators, one may use additional contraints
-(e.g. `in-range`). This is how they can be passed to the validator:
-
-[source, clojure]
-----
-(def schema {:num [[st/in-range 10 20]]})
-
-(st/validate {:num 21} schema)
-;; => [{:num "not in range"} {}]
-
-(st/validate {:num 19} schema)
-;; => [nil {:num 19}]
-----
-
-Note the double vector; the outer denotes a list of validatiors and the inner
-denotes a validator with patameters.
-
-
-=== Custom messages
-
-The builtin validators comes with default messages in human readable format, but
-sometimes you may want to change them (e.g. for i18n purposes). This is how you
-can do it:
-
-[source, clojure]
-----
-(def schema
- {:num [[st/in-range 10 20 :message "errors.not-in-range"]]})
-
-(st/validate {:num 21} schema)
-;; => [{:num "errors.not-in-range"} {}]
-----
-
-A message can contains format wildcards `%s`, these wildcards will be replaced by `args` of validator, e.g.:
-
-[source, clojure]
-----
-(def schema
- {:age [[st/in-range 18 26 :message "The age must be between %s and %s"]]})
-
-(st/validate {:age 30} schema)
-;; => [{:age "The age must be between 18 and 26"} {}]
-
-----
-
-
-=== Data coercions
-
-In addition to simple validations, this library includes the ability
-to coerce values, and a collection of validators that matches over strings. Let's
-see some code:
-
-.Example attaching custom coercions
-[source, clojure]
-----
-(def schema
- {:year [[st/integer :coerce str]]})
-
-(st/validate {:year 1994} schema))
-;; => [nil {:year "1994"}]
-----
-
-Looking at the data returned from the validation
-process, one can see that the value is properly coerced with the specified coercion function.
-
-This library comes with a collection of validators that already
-have attached coercion functions. These serve to validate parameters
-that arrive as strings but need to be converted to the appropriate type:
-
-[source, clojure]
-----
-(def schema {:year [st/required st/integer-str]
- :id [st/required st/uuid-str]})
-
-(st/validate {:year "1994"
- :id "543e7472-6624-4cb5-b65e-f3c341843d0f"}
- schema)
-;; => [nil {:year 1994, :id #uuid "543e7472-6624-4cb5-b65e-f3c341843d0f"}]
-----
-
-To facilitate this operation, the `validate!` function receives the
-data and schema, then returns the resulting data. If data not matches the schema
-an exception will be raised using `ex-info` clojure facility:
-
-[source, clojure]
-----
-(st/validate! {:year "1994" :id "543e7472-6624-4cb5-b65e-f3c341843d0f"} schema)
-;; => {:year 1994, :id #uuid "543e7472-6624-4cb5-b65e-f3c341843d0f"}
-----
-
-=== Builtin Validators
-
-This is the table with available builtin validators:
-
-.Builtin Validators
-[options="header", cols="2,1,4"]
-|===========================================================================
-| Identifier | Coercion | Description
-| `struct.core/keyword` | no | Validator for clojure's keyword
-| `struct.core/uuid` | no | Validator for UUID's
-| `struct.core/uuid-str` | yes | Validator for uuid strings with coercion to UUID
-| `struct.core/email` | no | Validator for email string.
-| `struct.core/required` | no | Marks field as required.
-| `struct.core/number` | no | Validator for Number.
-| `struct.core/number-str` | yes | Validator for number string.
-| `struct.core/integer` | no | Validator for integer.
-| `struct.core/integer-str` | yes | Validator for integer string.
-| `struct.core/boolean` | no | Validator for boolean.
-| `struct.core/boolean-str` | yes | Validator for boolean string.
-| `struct.core/string` | no | Validator for string.
-| `struct.core/string-str` | yes | Validator for string like.
-| `struct.core/in-range` | no | Validator for a number range.
-| `struct.core/member` | no | Validator for check if a value is member of coll.
-| `struct.core/positive` | no | Validator for positive number.
-| `struct.core/negative` | no | Validator for negative number.
-| `struct.core/function` | no | Validator for IFn interface.
-| `struct.core/vector` | no | Validator for clojure vector.
-| `struct.core/map` | no | Validator for clojure map.
-| `struct.core/set` | no | Validator for clojure set.
-| `struct.core/coll` | no | Validator for clojure coll.
-| `struct.core/every` | no | Validator to check if pred match for every item in coll.
-| `struct.core/identical-to` | no | Validator to check that value is identical to other field.
-| `struct.core/min-count` | no | Validator to check that value is has at least a minimum number of characters.
-| `struct.core/max-count` | no | Validator to check that value is not larger than a maximum number of characters.
-|===========================================================================
-
-Additional notes:
-
-* `number-str` coerces to `java.lang.Double` or `float` (cljs)
-* `boolean-str` coerces to `true` (`"t"`, `"true"`, `"1"`) or `false` (`"f"`, `"false"`, `"0"`).
-* `string-str` coerces anything to string using `str` function.
-
-
-=== Define your own validator
-
-As mentioned previously, the validators in _struct_ library are defined using plain
-hash-maps. For example, this is how the builtin `integer` validator is defined:
-
-[source, clojure]
-----
-(def integer
- {:message "must be a integer"
- :optional true
- :validate integer?}))
-----
-
-If the validator needs access to previously validated data, the `:state` key
-should be present with the value `true`. Let see the `identical-to` validator as example:
-
-[source,clojure]
-----
-(def identical-to
- {:message "does not match"
- :optional true
- :state true
- :validate (fn [state v ref]
- (let [prev (get state ref)]
- (= prev v)))})
-----
-
-Validators that access the state receive an additional argument with the state for validator
-function.
-
-=== Translating validation messages
-
-`struct.core/validate` accepts a third options argument where a function can be passed in with the `:translate` key like the following:
-
-[source,clojure]
-----
-(st/validate {:year "1994"
- :id "543e7472-6624-4cb5-b65e-f3c341843d0f"}
- schema
- {:translate (fn [message] (clojure.string/uppercase message)))
-----
-
-The translation function accepts the `:message` of the schma upon validation failure.
-This allows easy integration with an i18n library such as tempura if you privide a keyword for the schema's `:message` that in turn maps to the localised message in the dictionary.
-
-== Developers Guide
-
-=== Contributing
-
-Unlike Clojure and other Clojure contrib libs, there aren't many restrictions for
-contributions. Just open an issue or pull request.
-
-
-=== Get the Code
-
-_struct_ is open source and can be found on
-link:https://github.com/funcool/struct[github].
-
-You can clone the public repository with this command:
-
-[source,text]
-----
-git clone https://github.com/funcool/struct
-----
-
-
-=== Run tests
-
-To run the tests execute the following:
-
-For the JVM platform:
-
-[source, text]
-----
-lein test
-----
-
-And for JS platform:
-
-[source, text]
-----
-./scripts/build
-node out/tests.js
-----
-
-You will need to have nodejs installed on your system.
-
-=== License
-
-_struct_ is under public domain:
-
-----
-This is free and unencumbered software released into the public domain.
-
-Anyone is free to copy, modify, publish, use, compile, sell, or
-distribute this software, either in source code form or as a compiled
-binary, for any purpose, commercial or non-commercial, and by any
-means.
-
-In jurisdictions that recognize copyright laws, the author or authors
-of this software dedicate any and all copyright interest in the
-software to the public domain. We make this dedication for the benefit
-of the public at large and to the detriment of our heirs and
-successors. We intend this dedication to be an overt act of
-relinquishment in perpetuity of all present and future rights to this
-software under copyright law.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-For more information, please refer to
-----
diff --git a/latest/api/css/default.css b/latest/api/css/default.css
new file mode 100644
index 0000000..257ab2c
--- /dev/null
+++ b/latest/api/css/default.css
@@ -0,0 +1,442 @@
+@import url(http://fonts.googleapis.com/css?family=Droid+Sans+Mono:200,300,400);
+@import url(http://fonts.googleapis.com/css?family=Lato:light,regular);
+@import url(http://fonts.googleapis.com/css?family=Ubuntu:300,400,500);
+
+body {
+ font-family: "Lato", Helvetica, Arial, sans-serif;
+ font-weight: 300;
+ color:#585858;
+ font-size: 100%;
+ margin: 0px;
+}
+
+pre, code {
+ font-family: "Droid Sans Mono","DejaVu Sans Mono","Monospace",monospace;
+ font-weight: 300;
+}
+
+section.container {
+ display: flex;
+ font-size: 100%;
+}
+
+h2 {
+ font-weight: normal;
+ font-size: 3em;
+ padding: 10px 0 2px 0;
+ margin: 0;
+}
+
+header {
+ color: #333;
+ padding: 10px;
+}
+
+header small {
+ font-style: italic;
+}
+
+header h1 {
+ margin: 0;
+ padding: 0;
+ /* font-size: 12pt; */
+ font-weight: lighter;
+ /* text-shadow: -1px -1px 0px #333; */
+}
+
+header h1 a {
+ color: #333;
+ /* font-size: 32px; */
+ font-weight: 400;
+ text-decoration: none;
+}
+
+#content {
+ overflow: auto;
+ background: #fff;
+ color: #333;
+ padding: 0 18px;
+ font-size: 1.3em;
+}
+
+#namespaces {
+ border-right: solid 1px #cccccc;
+ min-width: 200px;
+ padding-right: 15px;
+}
+
+#vars {
+ border-right: solid 1px #cccccc;
+ width: 200px;
+}
+
+.sidebar {
+ overflow: auto;
+}
+
+.sidebar a {
+ color: #333;
+ display: block;
+ text-decoration: none;
+}
+
+.sidebar h3 {
+ margin: 0;
+ padding: 10px 10px 0 10px;
+ font-size: 19px;
+ font-weight: normal;
+}
+
+.sidebar ul {
+ padding: 0.5em 0em;
+ margin: 0;
+}
+
+.sidebar li {
+ display: block;
+ vertical-align: middle;
+}
+
+.sidebar li a, .sidebar li .no-link {
+ border-left: 3px solid transparent;
+ padding: 0 15px;
+ white-space: nowrap;
+}
+
+.sidebar li .no-link {
+ display: block;
+ color: #777;
+ font-style: italic;
+}
+
+.sidebar li .inner {
+ display: inline-block;
+ padding-top: 7px;
+ height: 24px;
+}
+
+.sidebar li a, .sidebar li .tree {
+ height: 31px;
+ /* height: 25px; */
+}
+
+.depth-1 .inner { padding-left: 2px; }
+.depth-2 .inner { padding-left: 6px; }
+.depth-3 .inner { padding-left: 20px; }
+.depth-4 .inner { padding-left: 34px; }
+.depth-5 .inner { padding-left: 48px; }
+.depth-6 .inner { padding-left: 62px; }
+
+.sidebar li .tree {
+ display: block;
+ float: left;
+ position: relative;
+ top: -10px;
+ margin: 0 4px 0 0;
+ padding: 0;
+}
+
+.sidebar li.depth-1 .tree {
+ display: none;
+}
+
+.sidebar li .tree .top, .sidebar li .tree .bottom {
+ display: block;
+ margin: 0;
+ padding: 0;
+ width: 7px;
+}
+
+.sidebar li .tree .top {
+ border-left: 1px solid #aaa;
+ border-bottom: 1px solid #aaa;
+ height: 19px;
+}
+
+.sidebar li .tree .bottom {
+ height: 22px;
+}
+
+.sidebar li.branch .tree .bottom {
+ border-left: 1px solid #aaa;
+}
+
+#namespaces li.current a {
+ border-left: 3px solid #a33;
+ border-left: 3px solid #7a2518;
+ color: #a33;
+ color: #7a2518;
+
+}
+
+#vars li.current a {
+ border-left: 3px solid #33a;
+ color: #33a;
+}
+
+.namespace-docs h2 {
+ color: #7a2518;
+}
+
+.namespace-docs h3 a {
+ color: #ba3925;
+ font-family: "Droid Sans Mono","DejaVu Sans Mono","Monospace",monospace;
+ font-weight: 400;
+ text-decoration: none;
+}
+
+.namespace-docs .usage code {
+ display: block;
+ color: #777;
+ margin: 2px 0;
+ font-size: 0.6em;
+}
+
+/* .usage code:first-child { */
+/* padding-top: 10px; */
+/* } */
+
+
+
+.namespace-index h3 a {
+ text-decoration: none;
+ color: #ba3925;
+ font-family: "Droid Sans Mono","DejaVu Sans Mono","Monospace",monospace;
+ font-weight: 300;
+}
+
+.public h3 {
+ margin: 0;
+}
+
+.public {
+ margin: 0;
+ border-top: 1px solid #efefef;
+ padding-top: 14px;
+ padding-bottom: 6px;
+}
+
+.public:last-child {
+ margin-bottom: 20%;
+}
+
+.members .public:last-child {
+ margin-bottom: 0;
+}
+
+.members {
+ margin: 15px 0;
+}
+
+.members h4 {
+ color: #555;
+ font-weight: normal;
+ font-variant: small-caps;
+ margin: 0 0 5px 0;
+}
+
+.members .inner {
+ padding-top: 5px;
+ padding-left: 12px;
+ margin-top: 2px;
+ margin-left: 7px;
+ border-left: 1px solid #bbb;
+}
+
+#content .members .inner h3 {
+ /* font-size: 12pt; */
+}
+
+.members .public {
+ border-top: none;
+ margin-top: 0;
+ padding-top: 6px;
+ padding-bottom: 0;
+}
+
+.members .public:first-child {
+ padding-top: 0;
+}
+
+h4.type,
+h4.dynamic,
+h4.added,
+h4.deprecated {
+ margin: 3px 10px 10spx 0;
+ font-weight: bold;
+ font-variant: small-caps;
+}
+
+.public h4.type,
+.public h4.dynamic,
+.public h4.added,
+.public h4.deprecated {
+ font-weight: bold;
+ /* margin: 3px 0 0 10px; */
+ font-size: 0.7em;
+}
+
+.members h4.type,
+.members h4.added,
+.members h4.deprecated {
+ margin-top: 1px;
+}
+
+h4.type {
+ color: #717171;
+}
+
+h4.dynamic {
+ color: #9933aa;
+}
+
+h4.added {
+ color: #508820;
+}
+
+h4.deprecated {
+ color: #880000;
+}
+
+.namespace {
+ margin-bottom: 40px;
+}
+
+.namespace:last-child {
+ margin-bottom: 10%;
+}
+
+.index {
+ padding: 0;
+ margin: 15px 0;
+}
+
+.index * {
+ display: inline;
+}
+
+.index p {
+ padding-right: 3px;
+}
+
+.index li {
+ padding-right: 5px;
+}
+
+.index li a {
+ color: #333;
+ font-family: "Droid Sans Mono","DejaVu Sans Mono","Monospace",monospace;
+ font-size: 0.8em;
+ text-decoration: none;
+ font-weight: 300;
+}
+
+.index ul {
+ padding-left: 0;
+}
+
+p {
+ margin: 15px 0;
+}
+
+.public p:first-child, .public pre.plaintext {
+ margin-top: 12px;
+}
+
+.doc {
+ margin: 0 0 26px 0;
+ clear: both;
+}
+
+.public .doc {
+ margin: 0;
+}
+
+.namespace-index .doc {
+ margin-bottom: 20px;
+}
+
+.namespace-index .namespace .doc {
+ margin-bottom: 10px;
+}
+
+.markdown {
+ /* line-height: 18px; */
+ /* font-size: 16px; */
+}
+
+.doc, .public, .namespace .index {
+ max-width: 780px;
+ overflow-x: visible;
+}
+
+.markdown code, .src-link a {
+ border-radius: 2px;
+ font-size: 0.8em;
+ color: #444;
+}
+
+.markdown pre {
+ background: #f4f4f4;
+ border: 1px solid #e0e0e0;
+ /* border-radius: 2px; */
+ padding: 5px 5px;
+ border-top: 1px solid #e0e0e0;
+ border-bottom: 1px solid #e0e0e0;
+}
+
+.markdown pre code {
+ background: transparent;
+ border: none;
+}
+
+.doc ul, .doc ol {
+ padding-left: 30px;
+}
+
+.doc table {
+ border-collapse: collapse;
+ margin: 0 10px;
+}
+
+.doc table td, .doc table th {
+ border: 1px solid #dddddd;
+ padding: 4px 6px;
+}
+
+.doc table th {
+ background: #f2f2f2;
+}
+
+.doc dl {
+ margin: 0 10px 20px 10px;
+}
+
+.doc dl dt {
+ font-weight: bold;
+ margin: 0;
+ padding: 3px 0;
+ border-bottom: 1px solid #ddd;
+}
+
+.doc dl dd {
+ padding: 5px 0;
+ margin: 0 0 5px 10px;
+}
+
+.doc abbr {
+ border-bottom: 1px dotted #333;
+ font-variant: none
+ cursor: help;
+}
+
+.src-link {
+ margin-bottom: 15px;
+}
+
+.src-link a {
+ /* font-size: 70%; */
+ padding: 1px 4px;
+ text-decoration: none;
+ color: #5555bb;
+}
\ No newline at end of file
diff --git a/latest/api/index.html b/latest/api/index.html
new file mode 100644
index 0000000..96fae4f
--- /dev/null
+++ b/latest/api/index.html
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/latest/api/promesa.core.html b/latest/api/promesa.core.html
new file mode 100644
index 0000000..7777a55
--- /dev/null
+++ b/latest/api/promesa.core.html
@@ -0,0 +1,2 @@
+
+promesa.core documentation
Same as map but with parameters inverted for convenience and for familiarity with javascript’s promises .then operator.
\ No newline at end of file
diff --git a/latest/api/promesa.monad.html b/latest/api/promesa.monad.html
new file mode 100644
index 0000000..d8fec47
--- /dev/null
+++ b/latest/api/promesa.monad.html
@@ -0,0 +1,2 @@
+
+promesa.monad documentation
\ No newline at end of file
diff --git a/latest/api/promesa.protocols.html b/latest/api/promesa.protocols.html
new file mode 100644
index 0000000..c84b432
--- /dev/null
+++ b/latest/api/promesa.protocols.html
@@ -0,0 +1,2 @@
+
+promesa.protocols documentation
\ No newline at end of file
diff --git a/latest/api/struct.core.html b/latest/api/struct.core.html
new file mode 100644
index 0000000..47c75f2
--- /dev/null
+++ b/latest/api/struct.core.html
@@ -0,0 +1,4 @@
+
+struct.core documentation
(validate! data schema)(validate! data schema {:keys [message], :or {message "Schema validation error"}, :as opts})
Analogous function to the validate that instead of return the errors, just raise a ex-info exception with errors in case them are or just return the validated data.
+
This function accepts the same parameters as validate with an additional :message that serves for customize the exception message.
You can observe that it consists in a simple map when you declare keys and
+corresponding validators for that key. A vector as value allows us to put
+more than one validator for the same key. If you have only one validator for the
+key, you can omit the vector and put it as single value.
+
+
+
The same schema can be defined using vectors, if the order of validation
+matters:
By default, all validators are optional so if the value is missing, no error
+will reported. If you want make the value mandatory, you should use a specific
+required validator.
+
+
+
And finally, start validating your data:
+
+
+
+
(-> {:name"Blood of Elves":year1994}
+ (st/validate+scheme+))
+;; => [nil {:name "Blood of Elves" :year 1994}]
+
+(-> {:name"Blood of Elves":year"1994"}
+ (st/validate+scheme+))
+;; => [{:year "must be a number"} {:name "Blood of Elves", :year "1994"}]
+
+(-> {:year"1994"}
+ (st/validate+scheme+))
+;; => [{:name "this field is mandatory", :year "must be a number"} {}]
+
+
+
+
If only want to know if some data is valid or not, you can use the valid? predicate
+for that purpose:
+
+
+
+
(st/valid?{:year"1994"}+scheme+)
+;; => false
+
+
+
+
The additional entries in the map are not stripped by default, but this behavior
+can be changed passing an additional flag as the third argument:
+
+
+
+
(-> {:name"Blood of Elves":year1994:foo"bar"}
+ (st/validate+scheme+))
+;; => [nil {:name "Blood of Elves" :year 1994 :foo "bar"}]
+
+(-> {:name"Blood of Elves":year1994:foo"bar"}
+ (st/validate+scheme+{:striptrue}))
+;; => [nil {:name "Blood of Elves" :year 1994}]
+
+
+
+
With similar syntax you can validate neested data structures, specifying in the
+key part the proper path to the neested data structure:
The builtin validators comes with default messages in human readable format, but
+sometimes you may want to change them (e.g. for i18n purposes). This is how you
+can do it:
A message can contains format wildcards %s, these wildcards will be replaced by args of validator, e.g.:
+
+
+
+
(def schema
+ {:age[[st/in-range1826:message"The age must be between %s and %s"]]})
+
+(st/validate{:age30}schema)
+;; => [{:age "The age must be between 18 and 26"} {}]
In addition to simple validations, this library includes the ability
+to coerce values, and a collection of validators that matches over strings. Let’s
+see some code:
Looking at the data returned from the validation
+process, one can see that the value is properly coerced with the specified coercion function.
+
+
+
This library comes with a collection of validators that already
+have attached coercion functions. These serve to validate parameters
+that arrive as strings but need to be converted to the appropriate type:
To facilitate this operation, the validate! function receives the
+data and schema, then returns the resulting data. If data not matches the schema
+an exception will be raised using ex-info clojure facility:
As mentioned previously, the validators in struct library are defined using plain
+hash-maps. For example, this is how the builtin integer validator is defined:
+
+
+
+
(def integer
+ {:message"must be a integer"
+ :optionaltrue
+ :validateinteger?}))
+
+
+
+
If the validator needs access to previously validated data, the :state key
+should be present with the value true. Let see the identical-to validator as example:
This is free and unencumbered software released into the public domain.
+
+Anyone is free to copy, modify, publish, use, compile, sell, or
+distribute this software, either in source code form or as a compiled
+binary, for any purpose, commercial or non-commercial, and by any
+means.
+
+In jurisdictions that recognize copyright laws, the author or authors
+of this software dedicate any and all copyright interest in the
+software to the public domain. We make this dedication for the benefit
+of the public at large and to the detriment of our heirs and
+successors. We intend this dedication to be an overt act of
+relinquishment in perpetuity of all present and future rights to this
+software under copyright law.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+For more information, please refer to <http://unlicense.org/>