Utility functions.
Utility functions.
(in? seq elm)
Returns true if the given element is in the given sequence.
Returns true if the given element is in the given sequence.
(keywordize-camel camel-str)
Converts the given camel cased string into a clojure style keyword.
For example: "CamelCase" => :camel-case
Converts the given camel cased string into a clojure style keyword. For example: "CamelCase" => :camel-case
(keywordize-camel-keys m)
Converts all the keys in the given map into keywords.
Converts all the keys in the given map into keywords.
(normalise-key key map)
Normalises the given key in the given map which means it is lower cased and sentenceized.
For example:
"CamelCased_SNAKE-kebab.DoT" => "camel cased snake kebab dot"
Normalises the given key in the given map which means it is lower cased and sentenceized. For example: "CamelCased_SNAKE-kebab.DoT" => "camel cased snake kebab dot"
(normalise-string str)
Normalises the given string which means it is lower cased and sentenceized.
For example:
"CamelCased_SNAKE-kebab.DoT" => "camel cased snake kebab dot"
Normalises the given string which means it is lower cased and sentenceized. For example: "CamelCased_SNAKE-kebab.DoT" => "camel cased snake kebab dot"
(sentenceize str)
Sentenceizes the given string which means camel, snake, kebab and dot cased strings are turned into normal sentences with spaces. This function will not split the following:
This is in an attempt to keep acronyms/initialisms and version numbers from getting split.
For example:
"CamelCased_SNAKE-kebab.dot_JSON-1.2.x" => "Camel Cased SNAKE kebab dot JSON 1.2.x"
Sentenceizes the given string which means camel, snake, kebab and dot cased strings are turned into normal sentences with spaces. This function will not split the following: 1. Multiple uppercased letters in a row 2. Digits separated by dots 3. x or * separated by dots This is in an attempt to keep acronyms/initialisms and version numbers from getting split. For example: "CamelCased_SNAKE-kebab.dot_JSON-1.2.x" => "Camel Cased SNAKE kebab dot JSON 1.2.x"
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close