Common core code. This file should have minimal dependencies. Clients should be able to safely :refer :all from this namespace.
Common core code. This file should have minimal dependencies. Clients should be able to safely :refer :all from this namespace.
(->inspect v)
Insert in threading macro to print the value.
Insert in threading macro to print the value.
(->options options)
Takes keyword argument and converts them to a map. If the args are prefixed with a map, the rest of the args are merged in.
Takes keyword argument and converts them to a map. If the args are prefixed with a map, the rest of the args are merged in.
(assocv coll i elem)
insert elem into vector at index
insert elem into vector at index
(assocv>> i elem coll)
assocv with coll as last param
assocv with coll as last param
(char-code-at s i)
Char code at the given index of a string
Char code at the given index of a string
(concatv & cols)
ensures the seq is a vector after concat-ing
ensures the seq is a vector after concat-ing
(conjv col item)
ensures the seq is a vector before conj-ing
ensures the seq is a vector before conj-ing
(count-by coll & {:as kvs})
Counts the number of items in coll that exactly match some given key-value pairs
Counts the number of items in coll that exactly match some given key-value pairs
(count-where pred coll)
Counts the number of items in coll that satisfy a predicate
Counts the number of items in coll that satisfy a predicate
(dissocv coll i)
removes the item at index i from the vector
removes the item at index i from the vector
(dissocv>> i coll)
dissocv with coll as last param
dissocv with coll as last param
(drop-until pred)
(drop-until pred coll)
Returns a lazy sequence of the items in coll starting from the first item for which (pred item) returns logical true. Returns a stateful transducer when no collection is provided.
Returns a lazy sequence of the items in coll starting from the first item for which (pred item) returns logical true. Returns a stateful transducer when no collection is provided.
(ex? e)
Returns true is e is an exception/error for the running platform
Returns true is e is an exception/error for the running platform
(ffilter pred coll)
Same as (first (filter ...)), but faster!
Same as (first (filter ...)), but faster!
(ffind-by coll & {:as kvs})
Finds the first item in coll matching kvs.
Finds the first item in coll matching kvs.
(find-by coll & {:as kvs})
Filters coll by items matching kvs.
Filters coll by items matching kvs.
(first-char-code s)
Char code at index 0 of a string
Char code at index 0 of a string
(for-all bindings body)
(formats format & args)
Platform agnostic string format fm
Platform agnostic string format fm
(index-of e coll)
Returns the index of e (using =) in the seq. nil if missing.
Returns the index of e (using =) in the seq. nil if missing.
(invoke f & args)
Insert in threading macro to invoke a function with a given set of arguments.
Insert in threading macro to invoke a function with a given set of arguments.
(map-all f coll)
(map-all f coll & colls)
Like for-all, but with map
Like for-all, but with map
(map-all-indexed f coll)
Like for-all, but with map-indexed
Like for-all, but with map-indexed
(map-component key-fn component-fn coll)
Creates a collection where each element is put into component syntax: [component-fn item] Each component is given a React key using (key-fn item).
Creates a collection where each element is put into component syntax: [component-fn item] Each component is given a React key using (key-fn item).
(map-distinct f)
(map-distinct f coll)
Like (distinct (map f coll))
Like (distinct (map f coll))
(map-some f)
(map-some f coll)
(map-some f coll & colls)
DEPRECATED: Use keep
instead.
Like (filter some? (map f coll)).
Returns a transducer when no collection is provided.
DEPRECATED: Use `keep` instead. Like (filter some? (map f coll)). Returns a transducer when no collection is provided.
(mapcat-set f coll)
Like (set (mapcat f coll))
Like (set (mapcat f coll))
Like max-key, but works with non-numeric values.
Like max-key, but works with non-numeric values.
Like max, but works with non-numeric values
Like max, but works with non-numeric values
Like min-key, but works with non-numeric values.
Like min-key, but works with non-numeric values.
Like min, but works with non-numeric values
Like min, but works with non-numeric values
(narity f)
Create an n-arity function from a 0-arity function
Create an n-arity function from a 0-arity function
(new-uuid)
(oget-in o ks)
(oget-in o ks not-found)
get-in for js objects
get-in for js objects
(pad-left s length)
(pad-left s length v)
Pads the left side of a string. If no character is provided, spaces will be used. If the string is greater than or equal to the pad length, the unmodified string will be returned.
Pads the left side of a string. If no character is provided, spaces will be used. If the string is greater than or equal to the pad length, the unmodified string will be returned.
(pad-left! s length)
(pad-left! s length v)
Same as pad-left, except the string will be trimmed to the desired length.
Same as pad-left, except the string will be trimmed to the desired length.
(pad-right s length)
(pad-right s length v)
Pads the right side of a string. If no character is provided, spaces will be used. If the string is greater than or equal to the pad length, the unmodified string will be returned.
Pads the right side of a string. If no character is provided, spaces will be used. If the string is greater than or equal to the pad length, the unmodified string will be returned.
(pad-right! s length)
(pad-right! s length v)
Same as pad-right, except the string will be trimmed to the desired length.
Same as pad-right, except the string will be trimmed to the desired length.
(remove-blanks e)
Return a map where all the keys with blank values are removed
Return a map where all the keys with blank values are removed
(remove-nils e)
Return a map where all the keys with nil values are removed
Return a map where all the keys with nil values are removed
(removev pred col)
(removev= col item)
(rsort coll)
(rsort comp coll)
Same as sort, but reversed
Same as sort, but reversed
(rsort-by keyfn coll)
(rsort-by keyfn comp coll)
Same as sort-by, but reversed
Same as sort-by, but reversed
(some-map f)
(some-map f coll)
Like (map f (filter some? coll)). Returns a transducer when no collection is provided.
Like (map f (filter some? coll)). Returns a transducer when no collection is provided.
(sum-by f coll)
Sums the results of a function applied to the elements of a collection
Sums the results of a function applied to the elements of a collection
(take-until pred)
(take-until pred coll)
Returns a lazy sequence of successive items from coll while (pred item) returns logical false. pred must be free of side effects. Returns a transducer when no collection is provided.
Returns a lazy sequence of successive items from coll while (pred item) returns logical false. pred must be free of side effects. Returns a transducer when no collection is provided.
(xor)
(xor x)
(xor x y & next)
Evaluates expressions one at a time, from left to right. If a second form evaluates to logical true, xor returns nil and doesn't evaluate any of the other expressions, otherwise it returns the value of the first logical true expression. If there are no truthy expressions, xor returns nil.
Evaluates expressions one at a time, from left to right. If a second form evaluates to logical true, xor returns nil and doesn't evaluate any of the other expressions, otherwise it returns the value of the first logical true expression. If there are no truthy expressions, xor returns nil.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close