Liking cljdoc? Tell your friends :D

discljord.util


bot-tokenclj

(bot-token token)

Takes a bot token, and returns the token value that can be used in the "Authorization" header for HTTP calls.

Takes a bot token, and returns the token value that can
be used in the "Authorization" header for HTTP calls.
sourceraw docstring

clean-json-inputclj

(clean-json-input j)

Takes in arbitrary JSON data, from clojure.data.json/read-str or similar, and conforms it to a more idiomatic Clojure form.

Strings and numbers simply return themselves. Objects have their keys and values recursively conformed. Objects with string keys are converted to maps with keyword keys. Arrays are converted to vectors with each element recursively conformed.

Takes in arbitrary JSON data, from clojure.data.json/read-str or similar,
and conforms it to a more idiomatic Clojure form.

Strings and numbers simply return themselves.
Objects have their keys and values recursively conformed.
Objects with string keys are converted to maps with keyword keys.
Arrays are converted to vectors with each element recursively conformed.
sourceraw docstring

json-keywordclj

(json-keyword s)

Takes a string and converts it to a keyword. The resulting keyword will consist entirely of lower-case letters, and replaces underscores with dashes.

Results in an unreadable keyword if the string contains spaces.

Takes a string and converts it to a keyword.
The resulting keyword will consist entirely of lower-case letters,
and replaces underscores with dashes.

Results in an unreadable keyword if the string contains spaces.
sourceraw docstring

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

× close