Liking cljdoc? Tell your friends :D

simply-ux.cookies


clear!cljs

(clear!)

removes all cookies

removes all cookies
raw docstring

contains-key?cljs

(contains-key? k)

is the key present in the cookies

is the key present in the cookies
raw docstring

contains-val?cljs

(contains-val? v)

is the value present in the cookies (as string)

is the value present in the cookies (as string)
raw docstring

countcljs

(count)

returns the number of cookies

returns the number of cookies
raw docstring

empty?cljs

(empty?)

true if no cookies are set

true if no cookies are set
raw docstring

getcljs

(get k & [default])

gets the value at the key (as edn), optional default when value is not found

gets the value at the key (as edn), optional default when value is not found
raw docstring

get-rawcljs

(get-raw k & [default])

gets the value at the key (as string), optional default when value is not found

gets the value at the key (as string), optional default when value is not found
raw docstring

keyscljs

(keys)

returns all the keys for the cookies

returns all the keys for the cookies
raw docstring

raw-valscljs

(raw-vals)

returns cookie values (as strings)

returns cookie values (as strings)
raw docstring

remove!cljs

(remove! k)
(remove! k path domain)

removes a cookie, optionally for a specific path and/or domain

removes a cookie, optionally for a specific path and/or domain
raw docstring

set!cljs

(set! k content & [{:keys [max-age path domain secure? raw?]} :as opts])

sets a cookie, the max-age for session cookie following optional parameters may be passed in as a map: :max-age - defaults to -1 :path - path of the cookie, defaults to the full request path :domain - domain of the cookie, when null the browser will use the full request host name :secure? - boolean specifying whether the cookie should only be sent over a secure channel :raw? - boolean specifying whether content should be stored raw, or as EDN

sets a cookie, the max-age for session cookie
following optional parameters may be passed in as a map:
:max-age - defaults to -1
:path - path of the cookie, defaults to the full request path
:domain - domain of the cookie, when null the browser will use the full request host name
:secure? - boolean specifying whether the cookie should only be sent over a secure channel
:raw? - boolean specifying whether content should be stored raw, or as EDN
raw docstring

valscljs

(vals)

returns cookie values (as edn)

returns cookie values (as edn)
raw docstring

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

× close