CrossClj

0.10.3 docs

SourceDocs



RECENT
    VARS
    +json-coercions+
    +string-coercions+
    coerce
    coerce-or-error!
    coercer
    collection-matcher
    default-coercion-matcher
    filter-schema-keys
    forwarding-matcher
    json-coercion-matcher
    map-filter-matcher
    multi-matcher
    or-matcher
    safe-coerce-string
    safe-int
    string->boolean
    string->date
    string->double
    string->long
    string->number
    string->uuid
    string-coercion-matcher

    « Index of all namespaces of this project

    (coerce value schema)(coerce value schema matcher)(coerce value schema matcher type)
    Simultaneously coerces and validates a value to match the given schema. If a value can't
    be coerced to match the schema, an ex-info is thrown - like schema.core/validate,
    but with overridable :type, defaulting to :schema-tools.coerce/error.
    Private
    (coerce-or-error! value schema coercer type)
    (coercer schema)(coercer schema matcher)(coercer schema matcher type)
    Produce a function that simultaneously coerces and validates a value against a schema.
    If a value can't be coerced to match the schema, an ex-info is thrown - like schema.core/validate,
    but with overridable :type, defaulting to :schema-tools.coerce/error.
    (collection-matcher schema)
    (default-coercion-matcher schema)
    Private
    (filter-schema-keys m schema-keys extra-keys-checker)
    (forwarding-matcher lead-matcher & tail-matchers)
    Creates a matcher where all matchers are combined with OR,
    but if the lead-matcher matches, it creates a sub-coercer and
    forwards the coerced value to tail-matchers.
    (map-filter-matcher schema)
    Creates a matcher which removes all illegal keys from non-record maps.
    
    (multi-matcher accept-schema accept-value fs)
    Creates a matcher for (accept-schema schema), reducing
    value with fs functions if (accept-value value).
    (or-matcher & matchers)
    Creates a matcher where the first matcher matching the
    given schema is used.
    Private
    (safe-coerce-string f)
    Private
    (safe-int x)
    (string->boolean x)
    (string->date x)
    (string->double x)
    (string->long x)
    (string->number x)
    (string->uuid x)