Liking cljdoc? Tell your friends :D

actionho-commons.common.util


add-map-key-prefixclj/s

(add-map-key-prefix prefix-str m)

Assumes map keys are keywords

Assumes map keys are keywords
raw docstring

add-prefix-to-map-keysclj/s

(add-prefix-to-map-keys m prefix-str keys-seq)

Changes map so that keys given in keys-seq are prefixed with prefix-str, assumes keys are keywords.

Changes map so that keys given in keys-seq are prefixed with prefix-str, assumes keys are keywords.
raw docstring

all-not-nil?clj/s

(all-not-nil? & args)

Expects args to be a sequence. Can't use (and) as (and) is a macro, https://clojuredocs.org/clojure.core/and

Expects args to be a sequence.
Can't use (and) as (and) is a macro, https://clojuredocs.org/clojure.core/and
raw docstring

convert-dash-keys->underscoresclj/s

(convert-dash-keys->underscores m)

Replaces all map keys with - in them with _

Replaces all map keys with - in them with _
raw docstring

current-log-levelclj/s


default-logger-app-prefixclj/s


dev-debug-modeclj/s


distinct-byclj/s

(distinct-by f)
(distinct-by f coll)

Basically (distinct), but you can pass it a function to compare by

Returns a lazy sequence of the elements of coll, removing any elements that return duplicate values when passed to a function f. From https://crossclj.info/fun/medley.core/distinct-by.html

Basically (distinct), but you can pass it a function to compare by

Returns a lazy sequence of the elements of coll, removing any elements that
return duplicate values when passed to a function f.
From https://crossclj.info/fun/medley.core/distinct-by.html
raw docstring

fn-helperclj/s

(fn-helper in-fn in-var)

For use in threading macros -> and ->>, so that inline/lamba functions can be defined and called in the threading macro.

For use in threading macros -> and ->>, so that inline/lamba functions can be defined and called in the threading macro.
raw docstring

get-keys-paths-in-mapclj/s

(get-keys-paths-in-map m)

Given a map, returns a vec of all the key-path vecs in the map. Only shows the full leaf paths, so no partial paths with more nodes underneath it. from http://stackoverflow.com/questions/21768802/how-can-i-get-the-nested-keys-of-a-map-in-clojure

Given a map, returns a vec of all the key-path vecs in the map.  Only shows the full leaf paths, so no partial paths with more nodes underneath it.
from http://stackoverflow.com/questions/21768802/how-can-i-get-the-nested-keys-of-a-map-in-clojure
raw docstring

get-log-level-intclj/s

(get-log-level-int log-level)

get-ordered-mapclj/s

(get-ordered-map m ordered-keys-vec)

get-utc-nowclj/s

(get-utc-now)

Get unix timestamp for right now

Get unix timestamp for right now
raw docstring

has-keys?clj/s

(has-keys? m key_vec)

if-helperclj/s

(if-helper check-var in-fn in-var)

For use in threading macros, if check-var is true, returns (in-fn in-var), otherwise in-var.

For use in threading macros, if check-var is true, returns (in-fn in-var), otherwise in-var.
raw docstring

in-repl-logging-atomclj/s


in?clj/s

(in? seq elm)

true if seq contains elem, else false

true if seq contains elem, else false
raw docstring

is-blank-string?clj/s

(is-blank-string? in-str)

jasclj/s

(jas predicate & message)

Javascript Assert for a truth value only

Javascript Assert for a truth value only
raw docstring

loggerclj


loglclj/s

(logl log-level in-str)

logl*clj/s

(logl* in-str)

logl-npprint-vecclj/s

(logl-npprint-vec log-level str-vec clj-obj-vec)

Prevents npprint from evaluating if there is no logging to be done, as pprint is extremely slow, and when flagged as not used in production via a :debug level, should not execute. Without this, with eager and not lazy evaluation, pprint will execute even if logging level is low.

Takes in 2 vecs, one for strings, and the other for clj-objs to npprint, interleaved together. e.g. ['abc: '] [clj-obj1] will give (str 'abc: ' (npprint clj-obj1))

Assumes length of str-vec is greater or equal than clj-obj-vec

Prevents npprint from evaluating if there is no logging to be done, as pprint is extremely slow, and when flagged as not used in production via a :debug level, should not execute.  Without this, with eager and not lazy evaluation, pprint will execute even if logging level is low.

Takes in 2 vecs, one for strings, and the other for clj-objs to npprint, interleaved together.
e.g. ['abc: '] [clj-obj1] will give (str 'abc: ' (npprint clj-obj1))

Assumes length of str-vec is greater or equal than clj-obj-vec
raw docstring

not-blank-str?clj/s

(not-blank-str? in-str)

npprintclj/s

(npprint clj-obj)

convenience wrapper around pprint to string, mostly for keeping the pprint import in one place

convenience wrapper around pprint to string, mostly for keeping the pprint import in one place
raw docstring

positionsclj/s

(positions pred coll)

e.g. (def v ["one" "two" "three" "two"]) (positions #{"two"} v) ; -> (1 3) from http://stackoverflow.com/questions/4830900/how-do-i-find-the-index-of-an-item-in-a-vector

e.g. (def v ["one" "two" "three" "two"])
(positions #{"two"} v) ; -> (1 3)
from http://stackoverflow.com/questions/4830900/how-do-i-find-the-index-of-an-item-in-a-vector
raw docstring

(print-vec-to-str print-type str-vec clj-obj-vec)
clj

Inputs: [print-type :- (ps/pred (fn* [p1__13458#] (in? [:normal-str :npprint] p1__13458#))) str-vec clj-obj-vec]

Takes in 2 vecs, one for strings, and the other for clj-objs to npprint, interleaved together. e.g. ['abc: '] [clj-obj1] will give (str 'abc: ' (npprint clj-obj1))

Assumes length of str-vec is greater or equal than clj-obj-vec.

Either does plain old str on uses npprint.

Inputs: [print-type :- (ps/pred (fn* [p1__13458#] (in? [:normal-str :npprint] p1__13458#))) str-vec clj-obj-vec]

Takes in 2 vecs, one for strings, and the other for clj-objs to npprint, interleaved together.
e.g. ['abc: '] [clj-obj1] will give (str 'abc: ' (npprint clj-obj1))

Assumes length of str-vec is greater or equal than clj-obj-vec.

Either does plain old str on uses npprint.
cljs

Inputs: [print-type :- (ps/pred (fn* [p1__16932#] (in? [:normal-str :npprint] p1__16932#))) str-vec clj-obj-vec]

Takes in 2 vecs, one for strings, and the other for clj-objs to npprint, interleaved together. e.g. ['abc: '] [clj-obj1] will give (str 'abc: ' (npprint clj-obj1))

Assumes length of str-vec is greater or equal than clj-obj-vec.

Either does plain old str on uses npprint.

Inputs: [print-type :- (ps/pred (fn* [p1__16932#] (in? [:normal-str :npprint] p1__16932#))) str-vec clj-obj-vec]

Takes in 2 vecs, one for strings, and the other for clj-objs to npprint, interleaved together.
e.g. ['abc: '] [clj-obj1] will give (str 'abc: ' (npprint clj-obj1))

Assumes length of str-vec is greater or equal than clj-obj-vec.

Either does plain old str on uses npprint.
raw docstring

reduce-indexedclj/s

(reduce-indexed f coll)
(reduce-indexed f init coll)
(reduce-indexed f init i coll)

Reduce while adding an index as the second argument to the function function signature for inner function is [in-coll idx var] from https://crossclj.info/fun/mc.util/reduce-indexed.html, unable to find on clojars

Reduce while adding an index as the second argument to the function
function signature for inner function is [in-coll idx var]
from https://crossclj.info/fun/mc.util/reduce-indexed.html, unable to find on clojars
raw docstring

rename-map-keysclj/s

(rename-map-keys m in-regex replacement-str)

Assumes map keys are keywords

Assumes map keys are keywords
raw docstring

repl-logclj/s

(repl-log in-str)

Needed so only in repl will this fire, otherwise will print out twice to console for everything

Needed so only in repl will this fire, otherwise will print out twice to console for everything
raw docstring

select-keys-regexclj/s

(select-keys-regex m regex)

Same as (select-keys), but does a regex search on the key names instead of by a straight list

Same as (select-keys), but does a regex search on the key names instead of by a straight list
raw docstring

set-clj-log4j-loggerclj

(set-clj-log4j-logger logger-name-str)

should-log?clj/s

(should-log? log-level)

Uses global var current-log-level

Uses global var current-log-level
raw docstring

should-log?-memoclj/s


sp-tableclj/s

(sp-table keys-vec vec-of-maps)

Wrapper around print-table so it'll work easily with logl.

Wrapper around print-table so it'll work easily with logl.
raw docstring

underscores->-clj/s

(underscores->- in-str)

Replace underscores with dashes

Replace underscores with dashes
raw docstring

when-helperclj/s

(when-helper check-fn in-var)

For use in threading macros some-> and some->>, if check-fn passes, returns val, otherwise nil.

For use in threading macros some-> and some->>, if check-fn passes, returns val, otherwise nil.
raw docstring

word-countclj/s


word-count*clj/s

(word-count* in-str)

Exactly as it sounds, counts the number of words in in-str

Exactly as it sounds, counts the number of words in in-str
raw docstring

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

× close