(clojurise-json-key k)
Converts JSON string keys (e.g. "fullName") to Clojure keyword keys (e.g. :full-name).
Converts JSON string keys (e.g. "fullName") to Clojure keyword keys (e.g. :full-name).
(exit)
(exit status-code)
(exit status-code message)
Exits the program after printing the given message, and returns the given status code.
Exits the program after printing the given message, and returns the given status code.
(getrn m k nf)
Like get, but also replaces nil values found in the map with the default value.
Like get, but also replaces nil values found in the map with the default value.
(human-readable-date-diff i1 i2)
Returns a string containing the human readable difference between two instants e.g. "4d 2h 37m 12.379s"
Returns a string containing the human readable difference between two instants e.g. "4d 2h 37m 12.379s"
(human-readable-size size)
Returns a string containing a rounded human readable size of the given number of bytes e.g. 1024 -> "1KB", 1234567890 -> "1.15GB"
Returns a string containing a rounded human readable size of the given number of bytes e.g. 1024 -> "1KB", 1234567890 -> "1.15GB"
(in-tz tz & body)
Executes body (assumed to include java-time logic) within the given tzdata timezone (e.g. "Americas/Los_Angeles").
Executes body (assumed to include java-time logic) within the given tzdata timezone (e.g. "Americas/Los_Angeles").
(log-exception e)
(log-exception e msg)
Logs the given exception and (optional) message at ERROR level.
Logs the given exception and (optional) message at ERROR level.
(mapfonk f m)
Returns a new map where f has been applied to all of the keys of m.
Returns a new map where f has been applied to all of the keys of m.
(mapfonv f m)
Returns a new map where f has been applied to all of the values of m.
Returns a new map where f has been applied to all of the values of m.
(nth-fibonacci n)
Returns the nth fibonacci.
Returns the nth fibonacci.
(parse-int x)
Parses a value (a string or numeric) into a Clojure integer (Java Long or BigInteger), returning nil if parsing failed. Note: redundant in Clojure v1.11+.
Parses a value (a string or numeric) into a Clojure integer (Java Long or BigInteger), returning nil if parsing failed. Note: redundant in Clojure v1.11+.
(replace-all string replacements)
Takes a sequence of replacements, and applies all of them to the given string, in the order provided. Each replacement in the sequence is a pair of values to be passed to clojure.string/replace (the 2nd and 3rd arguments).
Takes a sequence of replacements, and applies all of them to the given string, in the order provided. Each replacement in the sequence is a pair of values to be passed to clojure.string/replace (the 2nd and 3rd arguments).
(to-ascii s)
Converts the given string to ASCII, mapping a small number of Unicode characters (whitespace, hyphens, single & double quotes) to their ASCII equivalents and stripping the rest.
Converts the given string to ASCII, mapping a small number of Unicode characters (whitespace, hyphens, single & double quotes) to their ASCII equivalents and stripping the rest.
(truncate s len)
If s is longer than len, truncates it to len-1, trims any whitespace on the right, then adds the Unicode ellipsis (…) character to the end.
If s is longer than len, truncates it to len-1, trims any whitespace on the right, then adds the Unicode ellipsis (…) character to the end.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close