(call-if pred f)
Takes a single argument. If applying pred
to the argument yields a truthy value returns the
result of applying f
to the argument, otherwise returns the argument itself.
Takes a single argument. If applying `pred` to the argument yields a truthy value returns the result of applying `f` to the argument, otherwise returns the argument itself.
Accepts a single argument which must be a byte-array, returns true
the array represents the
Jupyter 'delimiter' frame (consisting of the bytes of the text '<IDS|MSG>' encoded as UTF-8);
otherwise returns false
.
Accepts a single argument which must be a byte-array, returns `true` the array represents the Jupyter 'delimiter' frame (consisting of the bytes of the text '<IDS|MSG>' encoded as UTF-8); otherwise returns `false`.
Given a file object returns a set containing the file itself and the transitive union of its parents. Note: The ancestry is derived exclusively by traversing the file values, i.e. does not matter whether or not the files thus traversed exist in an underlying file system.
Given a file object returns a set containing the file itself and the transitive union of its parents. Note: The ancestry is derived exclusively by traversing the *file values*, i.e. does not matter whether or not the files thus traversed exist in an underlying file system.
(parse-json-str string)
(parse-json-str string key-fn)
(parse-json-str string key-fn array-coerce-fn)
Returns the Clojure object corresponding to the given JSON-encoded string. An optional key-fn argument can be either true (to coerce keys to keywords), false to leave them as strings, or a function to provide custom coercion.
The array-coerce-fn is an optional function taking the name of an array field, and returning the collection to be used for array values.
If the top-level object is an array, it will be parsed lazily (use `parse-strict' if strict parsing is required for top-level arrays.
Returns the Clojure object corresponding to the given JSON-encoded string. An optional key-fn argument can be either true (to coerce keys to keywords), false to leave them as strings, or a function to provide custom coercion. The array-coerce-fn is an optional function taking the name of an array field, and returning the collection to be used for array values. If the top-level object is an array, it will be parsed lazily (use `parse-strict' if strict parsing is required for top-level arrays.
(re-find+ regex-string s)
If regex
is a representing a correct regular expression, parsable by re-find
, returns the
result of applying re-find
to the result of applying str
to s
, otherwise returns nil
.
If `regex` is a representing a correct regular expression, parsable by `re-find`, returns the result of applying `re-find` to the result of applying `str` to `s`, otherwise returns `nil`.
(sanitize-string regex)
Given a string, returns the string with all characters not matching regex
removed.
Given a string, returns the string with all characters not matching `regex` removed.
(submap? submap supermap)
Returns true
if all keys in submap
map to equal values in supermap
, and false
otherwise.
Returns `true` if all keys in `submap` map to equal values in `supermap`, and `false` otherwise.
(to-json-str v)
Returns JSON representation (string) of v
.
Returns JSON representation (string) of `v`.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close