Liking cljdoc? Tell your friends :D

cerber.helpers


ajax-request?clj

(ajax-request? headers)

Returns true if X-Requested-With header was found with XMLHttpRequest value, returns false otherwise.

Returns true if X-Requested-With header was found with
XMLHttpRequest value, returns false otherwise.
sourceraw docstring

assoc-if-existsclj

(assoc-if-exists m k v)

Assocs k with value v to map m only if there is already k associated.

Assocs k with value v to map m only if there is already k associated.
sourceraw docstring

assoc-if-not-existsclj

(assoc-if-not-exists m k v)

Assocs k with value v to map m only if no k was associated before.

Assocs k with value v to map m only if no k was associated before.
sourceraw docstring

atomic-assoc-or-nilclj

(atomic-assoc-or-nil a k v f)
source

bcrypt-checkclj

(bcrypt-check password hashed)

Validates password against given hash.

Validates password against given hash.
sourceraw docstring

bcrypt-hashclj

(bcrypt-hash password)

Performs BCrypt hashing of password.

Performs BCrypt hashing of password.
sourceraw docstring

coll->strclj

(coll->str coll)

Serializes collection of strings into single (space-separated) string.

Serializes collection of strings into single
(space-separated) string.
sourceraw docstring

cond-as->cljmacro

(cond-as-> expr name & clauses)

A mixture of cond-> and as-> allowing more flexibility in the test and step forms. Stolen from https://juxt.pro/blog/posts/condas.html.

A mixture of cond-> and as-> allowing more flexibility in the test and step forms.
Stolen from https://juxt.pro/blog/posts/condas.html.
sourceraw docstring

digestclj

(digest secret)

Applies SHA-256 on given secret.

Applies SHA-256 on given secret.
sourceraw docstring

expired?clj

(expired? item)

Returns true if given item (more specifically its :expires-at value) is expired or falsey otherwise. Item with no expires-at is non-expirable.

Returns true if given item (more specifically its :expires-at value)
is expired or falsey otherwise. Item with no expires-at is non-expirable.
sourceraw docstring

expires->ttlclj

(expires->ttl expires-at)

Returns number of seconds between now and expires-at.

Returns number of seconds between now and expires-at.
sourceraw docstring

generate-secretclj

(generate-secret)

Generates a unique secret code.

Generates a unique secret code.
sourceraw docstring

keywords->strclj

(keywords->str keywords)
source

nowclj

(now)
source

now-plus-secondsclj

(now-plus-seconds seconds)
source

reset-ttlclj

(reset-ttl item ttl)

Extends time to live of given item by ttl seconds.

Extends time to live of given item by ttl seconds.
sourceraw docstring

str->collclj

(str->coll str)

Return a vector of str substrings split by space.

Return a vector of `str` substrings split by space.
sourceraw docstring

str->intclj

(str->int str)

Safely transforms stringified number into an Integer. Returns a Failure in case of any exception.

Safely transforms stringified number into an Integer.
Returns a Failure in case of any exception.
sourceraw docstring

str->keywordsclj

(str->keywords str)
source

uuidclj

(uuid)

Generates uuid

Generates uuid
sourceraw docstring

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

× close