Liking cljdoc? Tell your friends :D

ws.web.spec

Reusable specs and spec-related utilities, common to web apps.

Reusable specs and spec-related utilities, common to web apps.
raw docstring

->booleanclj

(->boolean s)

Spec predicate: conform to Boolean else invalid.

Spec predicate: conform to Boolean else invalid.
sourceraw docstring

->dateclj

(->date s)

Spec predicate: conform to Date else invalid.

Spec predicate: conform to Date else invalid.
sourceraw docstring

->date-timeclj

(->date-time s)

Spec predicate: conform to Date else invalid.

Spec predicate: conform to Date else invalid.
sourceraw docstring

->doubleclj

(->double s)

Spec predicate: conform to Double else invalid.

Spec predicate: conform to Double else invalid.
sourceraw docstring

->longclj

(->long s)

Spec predicate: conform to Long else invalid.

Spec predicate: conform to Long else invalid.
sourceraw docstring

coerce->dateclj

(coerce->date s)

Given a string or date, produce a date, or throw an exception. Low level utility used by spec predicates to accept either a date or a string that can be converted to a date.

Given a string or date, produce a date, or throw an exception.
Low level utility used by spec predicates to accept either a
date or a string that can be converted to a date.
sourceraw docstring

coerce->date-timeclj

(coerce->date-time s)

Given a string or date, produce a date-time, or throw an exception. Low level utility used by spec predicates to accept either a date or a string that can be converted to a date-time.

Given a string or date, produce a date-time, or throw an exception.
Low level utility used by spec predicates to accept either a
date or a string that can be converted to a date-time.
sourceraw docstring

coerce->doubleclj

(coerce->double s)

Given a string or number, produce a double, or throw an exception. Low level utility used by spec predicates to accept either a number or a string that can be converted to a number.

Given a string or number, produce a double, or throw an exception.
Low level utility used by spec predicates to accept either a
number or a string that can be converted to a number.
sourceraw docstring

coerce->longclj

(coerce->long s)

Given a string or number, produce a long, or throw an exception. Low level utility used by spec predicates to accept either a number or a string that can be converted to a number.

Given a string or number, produce a long, or throw an exception.
Low level utility used by spec predicates to accept either a
number or a string that can be converted to a number.
sourceraw docstring

opt-param-speccljmacro

(opt-param-spec coerce str-or-spec & [spec])

Given a coercion function and a predicate / spec, produce a spec that accepts strings that can be coerced to a value that satisfies the predicate / spec, and will also generate strings that conform to the given spec. An empty string is coerced to nil; a generated nil produces the empty string.

Given a coercion function and a predicate / spec, produce a
spec that accepts strings that can be coerced to a value that
satisfies the predicate / spec, and will also generate strings
that conform to the given spec.
An empty string is coerced to nil; a generated nil produces the
empty string.
sourceraw docstring

param-speccljmacro

(param-spec coerce str-or-spec & [spec])

Given a coercion function and a predicate / spec, produce a spec that accepts strings that can be coerced to a value that satisfies the predicate / spec, and will also generate strings that conform to the given spec.

Given a coercion function and a predicate / spec, produce a
spec that accepts strings that can be coerced to a value that
satisfies the predicate / spec, and will also generate strings
that conform to the given spec.
sourceraw docstring

split->longsclj

(split->longs s)

Spec predicate: conform string to collection of Long. Also accepts a collection of numbers.

Spec predicate: conform string to collection of Long.
Also accepts a collection of numbers.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close