\ No newline at end of file
diff --git a/docs/io.jesi.backpack.async.html b/docs/io.jesi.backpack.async.html
index 8cd47c3..cc3b711 100644
--- a/docs/io.jesi.backpack.async.html
+++ b/docs/io.jesi.backpack.async.html
@@ -1,5 +1,5 @@
-io.jesi.backpack.async documentation
Creates a channel with an optional buffer, an optional transducer (like (map f), (filter p) etc or a composition thereof), and an optional exception-handler. If buf-or-n is a number, will create and use a fixed buffer of that size. If a transducer is supplied a buffer must be specified. ex-handler must be a fn of one argument - if an exception occurs during transformation it will be called with the Throwable as an argument, and any non-nil return value will be placed in the channel.
close!
(close! chan)
Closes a channel. The channel will no longer accept any puts (they will be ignored). Data in the channel remains available for taking, until exhausted, after which takes will return nil. If there are any pending takes, they will be dispatched with nil. Closing a closed channel is a no-op. Returns the channel.
Creates a channel with an optional buffer, an optional transducer (like (map f), (filter p) etc or a composition thereof), and an optional exception-handler. If buf-or-n is a number, will create and use a fixed buffer of that size. If a transducer is supplied a buffer must be specified. ex-handler must be a fn of one argument - if an exception occurs during transformation it will be called with the Throwable as an argument, and any non-nil return value will be placed in the channel.
close!
(close! chan)
Closes a channel. The channel will no longer accept any puts (they will be ignored). Data in the channel remains available for taking, until exhausted, after which takes will return nil. If there are any pending takes, they will be dispatched with nil. Closing a closed channel is a no-op. Returns the channel.
Logically closing happens after all puts have been delivered. Therefore, any blocked or parked puts will remain blocked/parked until a taker releases them.
closed?
(closed? chan)
returns true if the channel is nil or closed
go
macro
(go & body)
Asynchronously executes the body, returning immediately to the calling thread. Additionally, any visible calls to <!, >! and alt!/alts! channel operations within the body will block (if necessary) by ‘parking’ the calling thread rather than tying up an OS thread (or the only JS thread when in ClojureScript). Upon completion of the operation, the body will be resumed.
Returns a channel which will receive the result of the body when completed
go-call
macro
(go-call f chan)
Takes a function and a channel. Takes the value of the chanel using <? and applies it to f. Returns a channel which contains the result (or exception).
Attempts to evaluate a go block and retries it if should-retry-fn which is invoked with block’s evaluation result evaluates to false. should-retry-fn is optional and by default it will simply check if result is an exception. If the evaluation still fails after given retries, the last failed result will be returned in channel. Parameters: * retries - how many times to retry (default 5 times) * delay - how long to wait in seconds between retries (default 1s) * should-retry-fn - function that is invoked with result of block’s evaluation and should indicate whether to retry (if it returns true) or not (returns false)
go-try
macro
(go-try & body)
Asynchronously executes the body in a go block. Returns a channel which will receive the result of the body when completed or an exception if one is thrown.
open?
(open? chan)
returns true if the channel is open. The complement of closed?
put!
(put! chan val)
Asynchronously puts a val into a channel if it’s open. nil values are ignored. Returns the channel.
when-open
macro
(when-open chan & body)
\ No newline at end of file
diff --git a/docs/io.jesi.backpack.atom.html b/docs/io.jesi.backpack.atom.html
index 2bebf8b..ef4681b 100644
--- a/docs/io.jesi.backpack.atom.html
+++ b/docs/io.jesi.backpack.atom.html
@@ -1,3 +1,3 @@
-io.jesi.backpack.atom documentation
\ No newline at end of file
diff --git a/docs/io.jesi.backpack.cache.html b/docs/io.jesi.backpack.cache.html
index 6a685c2..5f0f4ab 100644
--- a/docs/io.jesi.backpack.cache.html
+++ b/docs/io.jesi.backpack.cache.html
@@ -1,3 +1,3 @@
-io.jesi.backpack.cache documentation
Creates a Time To Live cache with an initial seed (default {}) and maximum TTL in milliseconds (default 12 hours)
SimpleCache
protocol
A simple, self contained cache protocol
members
evict
(evict this entry)
Evicts the entry from the cache impl
get
(get this entry)
Retrieve the value associated with entry if it exists within the cache impl, else nil. May invoke a miss function to create the entry if not found.
reset
(reset this)
Resets the cache back to it’s initial value
set
(set this entry value)
Sets the entry to the specific value within the cache impl
\ No newline at end of file
diff --git a/docs/io.jesi.backpack.clojure.html b/docs/io.jesi.backpack.clojure.html
index 261c1b4..86cd90c 100644
--- a/docs/io.jesi.backpack.clojure.html
+++ b/docs/io.jesi.backpack.clojure.html
@@ -1,3 +1,3 @@
-io.jesi.backpack.clojure documentation
Transforms Java to Clojure. Converting keys to kebab-case keywords by default
pprint-str
(pprint-str object)
pprint-str-code
(pprint-str-code object)
\ No newline at end of file
diff --git a/docs/io.jesi.backpack.clojurescript.html b/docs/io.jesi.backpack.clojurescript.html
index 0f43011..03d50dd 100644
--- a/docs/io.jesi.backpack.clojurescript.html
+++ b/docs/io.jesi.backpack.clojurescript.html
@@ -1,3 +1,3 @@
-io.jesi.backpack.clojurescript documentation
Transforms ClojureScript to JavaScript. Converting keys to camelCase by default
js->clj
(js->clj js)(js->clj js key-fn)
Transforms JavaScript to ClojureScript. Converting keys to kebab-case keywords by default
\ No newline at end of file
diff --git a/docs/io.jesi.backpack.collection.html b/docs/io.jesi.backpack.collection.html
index ff5453b..437c898 100644
--- a/docs/io.jesi.backpack.collection.html
+++ b/docs/io.jesi.backpack.collection.html
@@ -1,3 +1,3 @@
-io.jesi.backpack.collection documentation
Returns a comparator function that sorts based on the provided idx map. Takes an optional not-found-fn that’s called when a key is not found in the idx, takes a key and returns a sort index. The default not-found-fn returns the count of idx.
map-leaves
(map-leaves f coll)(map-leaves f leaf-pred coll)
Traverses and applies the mapping function to each leaf of a data structure. The mapping function is given the path and value at that path
reduce-leaves
(reduce-leaves f coll)(reduce-leaves f init coll)(reduce-leaves f init leaf-pred coll)
Traverses and reduces a data structure where the reducing function is given an accumulator, vector path and value at that path
remove-empty
(remove-empty x)
remove-nil-vals
(remove-nil-vals map)
Shallowly removes nil values from a map
rename-keys!
(rename-keys! tmap kmap)
Returns the transient map with the keys in kmap renamed to the vals in kmap
safe-empty?
(safe-empty? x)
select-non-nil-keys
(select-non-nil-keys m keys)
select-vals
(select-vals m ks)
Selects all values from a map using specified keys. Missing keys return nil
sorted-map-by-index
(sorted-map-by-index idx & keyvals)
sorted-map-by-order
(sorted-map-by-order ks & keyvals)
sorted?
(sorted? coll)(sorted? comp coll)
True if a collection is sorted by means of a 2 or 3 way comparator
trans-reduce
(trans-reduce f [c & coll])(trans-reduce f init coll)
trans-reduce-kv
(trans-reduce-kv f init coll)
transform-keys
(transform-keys f coll)
Recursively transforms all map keys in coll with f
translate-keys
(translate-keys kmap map)
Updates map with the keys from kmap
update!
(update! tcoll k f)(update! tcoll k f x)(update! tcoll k f x y)(update! tcoll k f x y z)(update! tcoll k f x y z & more)
‘Updates’ a value in an transient associative structure, where k is a key and f is a function that will take the old value and any supplied args and return the new value, and returns a new structure. If the key does not exist, nil is passed as the old value.
update-some
(update-some m k f & args)
Updates a key in a map with a function, only if the key is present and the result of f is not nil.
update-some!
(update-some! tmap k f)
Replaces the value of a key in a transitive map if the result of the function is some
\ No newline at end of file
+io.jesi.backpack.collection documentation
Returns a comparator function that sorts based on the provided idx map. Takes an optional not-found-fn that’s called when a key is not found in the idx, takes a key and returns a sort index. The default not-found-fn returns the count of idx.
map-leaves
(map-leaves f coll)(map-leaves f leaf-pred coll)
Traverses and applies the mapping function to each leaf of a data structure. The mapping function is given the path and value at that path
reduce-leaves
(reduce-leaves f coll)(reduce-leaves f init coll)(reduce-leaves f init leaf-pred coll)
Traverses and reduces a data structure where the reducing function is given an accumulator, vector path and value at that path
remove-empty
(remove-empty x)
remove-nil-vals
(remove-nil-vals map)
Shallowly removes nil values from a map
rename-keys!
(rename-keys! tmap kmap)
Returns the transient map with the keys in kmap renamed to the vals in kmap
safe-empty?
(safe-empty? x)
select-non-nil-keys
(select-non-nil-keys m keys)
select-vals
(select-vals m ks)
Selects all values from a map using specified keys. Missing keys return nil
sorted-map-by-index
(sorted-map-by-index idx & keyvals)
sorted-map-by-order
(sorted-map-by-order ks & keyvals)
sorted?
(sorted? coll)(sorted? comp coll)
True if a collection is sorted by means of a 2 or 3 way comparator
trans-reduce
(trans-reduce f [c & coll])(trans-reduce f init coll)
trans-reduce-kv
(trans-reduce-kv f init coll)
transform-keys
(transform-keys f coll)
Recursively transforms all map keys in coll with f
translate-keys
(translate-keys kmap map)
Updates map with the keys from kmap
update!
(update! tcoll k f)(update! tcoll k f x)(update! tcoll k f x y)(update! tcoll k f x y z)(update! tcoll k f x y z & more)
‘Updates’ a value in an transient associative structure, where k is a key and f is a function that will take the old value and any supplied args and return the new value, and returns a new structure. If the key does not exist, nil is passed as the old value.
update-some
(update-some m k f & args)
Updates a key in a map with a function, only if the key is present and the result of f is not nil.
update-some!
(update-some! tmap k f)
Replaces the value of a key in a transitive map if the result of the function is some
\ No newline at end of file
diff --git a/docs/io.jesi.backpack.common.html b/docs/io.jesi.backpack.common.html
index 1cc719c..bf7b337 100644
--- a/docs/io.jesi.backpack.common.html
+++ b/docs/io.jesi.backpack.common.html
@@ -1,3 +1,3 @@
-io.jesi.backpack.common documentation
Returns true if x is named (can be passed to name)
namespaced?
(namespaced? named)
Returns true if the named has a namespace
\ No newline at end of file
diff --git a/docs/io.jesi.backpack.env.html b/docs/io.jesi.backpack.env.html
index bfdf642..11fbfce 100644
--- a/docs/io.jesi.backpack.env.html
+++ b/docs/io.jesi.backpack.env.html
@@ -1,6 +1,6 @@
-io.jesi.backpack.env documentation
Take the &env from a macro, and tell whether we are expanding into CLJS.
converter
multimethod
Platform specific converters. Takes the env (from &env or platform keyword) and returns a converter function. The converter function takes a symbol and returns the platform specific version of that symbol.
platforms
An atom containing the platform specific predicates. Is an map of predicates, and their platform keyword value. The predicate should take a macro &env and return a boolean. See https://clojure.org/guides/reader_conditionals for platform keywords.
symbol
(symbol env sym)
Takes the target env (from &env or platform keyword), and a quoted symbol. Transforms the symbol to platform specific symbol.
Take the &env from a macro, and tell whether we are expanding into CLJS.
converter
multimethod
Platform specific converters. Takes the env (from &env or platform keyword) and returns a converter function. The converter function takes a symbol and returns the platform specific version of that symbol.
platforms
An atom containing the platform specific predicates. Is an map of predicates, and their platform keyword value. The predicate should take a macro &env and return a boolean. See https://clojure.org/guides/reader_conditionals for platform keywords.
symbol
(symbol env sym)
Takes the target env (from &env or platform keyword), and a quoted symbol. Transforms the symbol to platform specific symbol.
Transforms the symbols in a quoted form to platform specific symbols. Takes a quoted-form to be transformed. Use this in macros. e.g. (defmacro go [& body](env/transform (async/go ~@body)))`
WARNING: Will throw StackOverflowError for deeply nested forms. Use io.jesi.backpack.env/symbol to transform individual symbols
transform*
(transform* env quoted-form)
Transforms the symbols in a quoted form to platform specific symbols. Takes an env (from &env or platform keyword), and a quoted-form to be transformed.
WARNING: Will throw StackOverflowError for deeply nested forms Use io.jesi.backpack.env/symbol to transform individual symbols
\ No newline at end of file
diff --git a/docs/io.jesi.backpack.exceptions.html b/docs/io.jesi.backpack.exceptions.html
index e2775bd..712f152 100644
--- a/docs/io.jesi.backpack.exceptions.html
+++ b/docs/io.jesi.backpack.exceptions.html
@@ -1,3 +1,3 @@
-io.jesi.backpack.exceptions documentation
Returns true if x is a Clojure Throwable or ClojureScript js/Error
throw-if-throwable
(throw-if-throwable ex)
Throw ex if it’s an exception. Retains the message, data, and cause
\ No newline at end of file
diff --git a/docs/io.jesi.backpack.fn.html b/docs/io.jesi.backpack.fn.html
index c702282..14ebf9a 100644
--- a/docs/io.jesi.backpack.fn.html
+++ b/docs/io.jesi.backpack.fn.html
@@ -1,3 +1,3 @@
-io.jesi.backpack.fn documentation
Returns a comparator where values returning from a value function are compared against
and-fn
(and-fn pred & more)
Higher order and. Takes any number of predicates and returns a function that takes a value and returns true if ALL individual predicates return true, else return false.
any?
(any? pred coll)
Returns true if any item in coll returns true for pred, otherwise false
apply-when
(apply-when f v)
Invokes f when it’s truthy
call
(call f v)
Calls the function f with a value v
compr
(compr)(compr f)(compr f g)(compr f g & more)
Composes functions left to right, the opposite of comp
d#
(d# a)
Derefs a value if it is derefable
if-fn
(if-fn pred then)(if-fn pred then else)
Higher-order if function. Takes a predicate (pred), calling then or (optionally) else based on the predicate. Returns nil if no else defined.
map-if
(map-if pred f col)
noop
or-fn
(or-fn pred & more)
Higher order or. Takes any number of predicates and returns a function that takes a value and returns true if ANY individual predicates return true, else return false.
p=
(p= & x)
Partial =
partial-right
(partial-right f & args)
pass
(pass f)
pass-if
(pass-if pred f)
\ No newline at end of file
+io.jesi.backpack.fn documentation
Returns a comparator where values returning from a value function are compared against
and-fn
(and-fn pred & more)
Higher order and. Takes any number of predicates and returns a function that takes a value and returns true if ALL individual predicates return true, else return false.
any?
(any? pred coll)
Returns true if any item in coll returns true for pred, otherwise false
apply-when
(apply-when f v)
Invokes f when it’s truthy
call
(call f v)
Calls the function f with a value v
compr
(compr)(compr f)(compr f g)(compr f g & more)
Composes functions left to right, the opposite of comp
d#
(d# a)
Derefs a value if it is derefable
if-fn
(if-fn pred then)(if-fn pred then else)
Higher-order if function. Takes a predicate (pred), calling then or (optionally) else based on the predicate. Returns nil if no else defined.
map-if
(map-if pred f col)
noop
or-fn
(or-fn pred & more)
Higher order or. Takes any number of predicates and returns a function that takes a value and returns true if ANY individual predicates return true, else return false.
p=
(p= & x)
Partial =
partial-right
(partial-right f & args)
pass
(pass f)
pass-if
(pass-if pred f)
\ No newline at end of file
diff --git a/docs/io.jesi.backpack.html b/docs/io.jesi.backpack.html
index 9729368..c7e0181 100644
--- a/docs/io.jesi.backpack.html
+++ b/docs/io.jesi.backpack.html
@@ -1,3 +1,3 @@
-io.jesi.backpack documentation
Returns a comparator where values returning from a value function are compared against
->kebab-case
(->kebab-case s)
->kebab-case-key
->proper-case
(->proper-case s)
->snake_case
(->snake_case s)
->snake_case-key
->uri
(->uri s)
->uuid
multimethod
Coerces a value into a UUID if possible, otherwise returns nil
->uuid-or-not
(->uuid-or-not id)
and-fn
(and-fn pred & more)
Higher order and. Takes any number of predicates and returns a function that takes a value and returns true if ALL individual predicates return true, else return false.
any?
(any? pred coll)
Returns true if any item in coll returns true for pred, otherwise false
apply-when
(apply-when f v)
Invokes f when it’s truthy
assoc-in
(assoc-in m & kvs)
assoc-some!
(assoc-some! tmap k v)
Assocs some value into a transitive map
blank?
Similar to clojure.string/blank? but returns false if given a non-string
call
(call f v)
Calls the function f with a value v
collify
(collify)(collify v)
Puts value v in a vector if it is not a collection. Returns nil if no value
compr
(compr)(compr f)(compr f g)(compr f g & more)
Composes functions left to right, the opposite of comp
Returns a map of paths which have changed :added, :changed, :removed, and :same
dissoc-all
(dissoc-all map & keys)
dissoc-in
(dissoc-in m path & paths)
Dissociates paths from a map. Any empty maps produced will be removed
distinct-by
(distinct-by key entities)
empty->nil
(empty->nil x)
Returns nil if argument returns true for (clojure.core/empty?)
exception?
(exception? x)
Returns true if x is a Clojure Throwable or ClojureScript js/Error
filter-empty
filter-nil-keys
(filter-nil-keys map)
Filters out all nil key values from a map
filter-values
(filter-values pred map)
first-some
(first-some m & ks)
if-fn
(if-fn pred then)(if-fn pred then else)
Higher-order if function. Takes a predicate (pred), calling then or (optionally) else based on the predicate. Returns nil if no else defined.
in?
(in? col el)
infinity
Java’s Integer/MAX_VALUE for consistence use in Clojure(Script) projects
java->clj
(java->clj j)(java->clj j key-fn)
Transforms Java to Clojure. Converting keys to kebab-case keywords by default
kebab->proper-case
(kebab->proper-case s)
kebab-case->Proper-Kebab-Case
(kebab-case->Proper-Kebab-Case kebab-case-str)
macro?
(macro? sym)
True if the provided sym is a macro
map-if
(map-if pred f col)
map-key-walker
map-leaves
(map-leaves f coll)(map-leaves f leaf-pred coll)
Traverses and applies the mapping function to each leaf of a data structure. The mapping function is given the path and value at that path
map-walker
mod
(mod num div)
Modulus of num and div supporting float and decimal values. Truncates toward negative infinity.
named?
(named? x)
Returns true if x is named (can be passed to name)
namespaced?
(namespaced? named)
Returns true if the named has a namespace
noop
not-blank?
or-fn
(or-fn pred & more)
Higher order or. Takes any number of predicates and returns a function that takes a value and returns true if ANY individual predicates return true, else return false.
p=
(p= & x)
Partial =
partial-right
(partial-right f & args)
pass
(pass f)
pass-if
(pass-if pred f)
path-walker
A spectre recursive path navigator, that collects all paths to the occurrences of leaves that match the given predicate. Does not traverse deeper into the matched structures.
pprint-str
(pprint-str object)
pprint-str-code
(pprint-str-code object)
prefix
reduce-leaves
(reduce-leaves f coll)(reduce-leaves f init coll)(reduce-leaves f init leaf-pred coll)
Traverses and reduces a data structure where the reducing function is given an accumulator, vector path and value at that path
Removes the prefix if the string starts with it otherwise ignores, is case sensitive
rename-keys!
(rename-keys! tmap kmap)
Returns the transient map with the keys in kmap renamed to the vals in kmap
round-to
(round-to precision d)
Rounds a given value ‘d’ to the specified ‘precision’
safe-empty?
(safe-empty? x)
select-non-nil-keys
(select-non-nil-keys m keys)
select-vals
(select-vals m ks)
Selects all values from a map using specified keys. Missing keys return nil
sorted-map-by-index
(sorted-map-by-index idx & keyvals)
sorted-map-by-order
(sorted-map-by-order ks & keyvals)
sorted?
(sorted? coll)(sorted? comp coll)
True if a collection is sorted by means of a 2 or 3 way comparator
split-at-first
(split-at-first value s)
Splits s at the first occurrence of value, returns nil when s is empty
subs
(subs s start)(subs s start end)
subs-inc
(subs-inc match s)
Returns the substring of ‘s’ up to and including the ‘match’ or nil
subs-to
(subs-to match s)
Returns the substring of ‘s’ up until the ‘match’
suffix
throw-if-throwable
(throw-if-throwable ex)
Throw ex if it’s an exception. Retains the message, data, and cause
trans-reduce
(trans-reduce f [c & coll])(trans-reduce f init coll)
trans-reduce-kv
(trans-reduce-kv f init coll)
transform-keys
(transform-keys f coll)
Recursively transforms all map keys in coll with f
translate-keys
(translate-keys kmap map)
Updates map with the keys from kmap
true-string?
(true-string? s)
True if ‘s’ is the string literal ‘true’
update!
(update! tcoll k f)(update! tcoll k f x)(update! tcoll k f x y)(update! tcoll k f x y z)(update! tcoll k f x y z & more)
‘Updates’ a value in an transient associative structure, where k is a key and f is a function that will take the old value and any supplied args and return the new value, and returns a new structure. If the key does not exist, nil is passed as the old value.
update-some
(update-some m k f & args)
Updates a key in a map with a function, only if the key is present and the result of f is not nil.
update-some!
(update-some! tmap k f)
Replaces the value of a key in a transitive map if the result of the function is some
uuid-str?
(uuid-str? s)
True if ‘s’ is a string and matches the UUID format
xor
(xor)(xor x)(xor x y)(xor x y & more)
Returns true only if one argument is true
\ No newline at end of file
+io.jesi.backpack documentation
Returns a comparator where values returning from a value function are compared against
->kebab-case
(->kebab-case s)
->kebab-case-key
->proper-case
(->proper-case s)
->snake_case
(->snake_case s)
->snake_case-key
->uri
(->uri s)
->uuid
multimethod
Coerces a value into a UUID if possible, otherwise returns nil
->uuid-or-not
(->uuid-or-not id)
and-fn
(and-fn pred & more)
Higher order and. Takes any number of predicates and returns a function that takes a value and returns true if ALL individual predicates return true, else return false.
any?
(any? pred coll)
Returns true if any item in coll returns true for pred, otherwise false
apply-when
(apply-when f v)
Invokes f when it’s truthy
assoc-in
(assoc-in m & kvs)
assoc-some!
(assoc-some! tmap k v)
Assocs some value into a transitive map
blank?
Similar to clojure.string/blank? but returns false if given a non-string
call
(call f v)
Calls the function f with a value v
collify
(collify)(collify v)
Puts value v in a vector if it is not a collection. Returns nil if no value
compr
(compr)(compr f)(compr f g)(compr f g & more)
Composes functions left to right, the opposite of comp
Returns a map of paths which have changed :added, :changed, :removed, and :same
dissoc-all
(dissoc-all map & keys)
dissoc-in
(dissoc-in m path & paths)
Dissociates paths from a map. Any empty maps produced will be removed
distinct-by
(distinct-by key entities)
empty->nil
(empty->nil x)
Returns nil if argument returns true for (clojure.core/empty?)
exception?
(exception? x)
Returns true if x is a Clojure Throwable or ClojureScript js/Error
filter-empty
filter-nil-keys
(filter-nil-keys map)
Filters out all nil key values from a map
filter-values
(filter-values pred map)
first-some
(first-some m & ks)
if-fn
(if-fn pred then)(if-fn pred then else)
Higher-order if function. Takes a predicate (pred), calling then or (optionally) else based on the predicate. Returns nil if no else defined.
in?
(in? col el)
infinity
Java’s Integer/MAX_VALUE for consistence use in Clojure(Script) projects
java->clj
(java->clj j)(java->clj j key-fn)
Transforms Java to Clojure. Converting keys to kebab-case keywords by default
kebab->proper-case
(kebab->proper-case s)
kebab-case->Proper-Kebab-Case
(kebab-case->Proper-Kebab-Case kebab-case-str)
macro?
(macro? sym)
True if the provided sym is a macro
map-if
(map-if pred f col)
map-key-walker
map-leaves
(map-leaves f coll)(map-leaves f leaf-pred coll)
Traverses and applies the mapping function to each leaf of a data structure. The mapping function is given the path and value at that path
map-walker
mod
(mod num div)
Modulus of num and div supporting float and decimal values. Truncates toward negative infinity.
named?
(named? x)
Returns true if x is named (can be passed to name)
namespaced?
(namespaced? named)
Returns true if the named has a namespace
noop
not-blank?
or-fn
(or-fn pred & more)
Higher order or. Takes any number of predicates and returns a function that takes a value and returns true if ANY individual predicates return true, else return false.
p=
(p= & x)
Partial =
partial-right
(partial-right f & args)
pass
(pass f)
pass-if
(pass-if pred f)
path-walker
A spectre recursive path navigator, that collects all paths to the occurrences of leaves that match the given predicate. Does not traverse deeper into the matched structures.
pprint-str
(pprint-str object)
pprint-str-code
(pprint-str-code object)
prefix
reduce-leaves
(reduce-leaves f coll)(reduce-leaves f init coll)(reduce-leaves f init leaf-pred coll)
Traverses and reduces a data structure where the reducing function is given an accumulator, vector path and value at that path
Removes the prefix if the string starts with it otherwise ignores, is case sensitive
rename-keys!
(rename-keys! tmap kmap)
Returns the transient map with the keys in kmap renamed to the vals in kmap
round-to
(round-to precision d)
Rounds a given value ‘d’ to the specified ‘precision’
safe-empty?
(safe-empty? x)
select-non-nil-keys
(select-non-nil-keys m keys)
select-vals
(select-vals m ks)
Selects all values from a map using specified keys. Missing keys return nil
sorted-map-by-index
(sorted-map-by-index idx & keyvals)
sorted-map-by-order
(sorted-map-by-order ks & keyvals)
sorted?
(sorted? coll)(sorted? comp coll)
True if a collection is sorted by means of a 2 or 3 way comparator
split-at-first
(split-at-first value s)
Splits s at the first occurrence of value, returns nil when s is empty
subs
(subs s start)(subs s start end)
subs-inc
(subs-inc match s)
Returns the substring of ‘s’ up to and including the ‘match’ or nil
subs-to
(subs-to match s)
Returns the substring of ‘s’ up until the ‘match’
suffix
throw-if-throwable
(throw-if-throwable ex)
Throw ex if it’s an exception. Retains the message, data, and cause
trans-reduce
(trans-reduce f [c & coll])(trans-reduce f init coll)
trans-reduce-kv
(trans-reduce-kv f init coll)
transform-keys
(transform-keys f coll)
Recursively transforms all map keys in coll with f
translate-keys
(translate-keys kmap map)
Updates map with the keys from kmap
true-string?
(true-string? s)
True if ‘s’ is the string literal ‘true’
update!
(update! tcoll k f)(update! tcoll k f x)(update! tcoll k f x y)(update! tcoll k f x y z)(update! tcoll k f x y z & more)
‘Updates’ a value in an transient associative structure, where k is a key and f is a function that will take the old value and any supplied args and return the new value, and returns a new structure. If the key does not exist, nil is passed as the old value.
update-some
(update-some m k f & args)
Updates a key in a map with a function, only if the key is present and the result of f is not nil.
update-some!
(update-some! tmap k f)
Replaces the value of a key in a transitive map if the result of the function is some
uuid-str?
(uuid-str? s)
True if ‘s’ is a string and matches the UUID format
xor
(xor)(xor x)(xor x y)(xor x y & more)
Returns true only if one argument is true
\ No newline at end of file
diff --git a/docs/io.jesi.backpack.http.codes.html b/docs/io.jesi.backpack.http.codes.html
index d08e26e..1ac8484 100644
--- a/docs/io.jesi.backpack.http.codes.html
+++ b/docs/io.jesi.backpack.http.codes.html
@@ -1,3 +1,3 @@
-io.jesi.backpack.http.codes documentation
\ No newline at end of file
diff --git a/docs/io.jesi.backpack.http.response.html b/docs/io.jesi.backpack.http.response.html
index bdd1df6..bd51e23 100644
--- a/docs/io.jesi.backpack.http.response.html
+++ b/docs/io.jesi.backpack.http.response.html
@@ -1,3 +1,3 @@
-io.jesi.backpack.http.response documentation
\ No newline at end of file
diff --git a/docs/io.jesi.backpack.http.status.html b/docs/io.jesi.backpack.http.status.html
index 405c679..dafdcf8 100644
--- a/docs/io.jesi.backpack.http.status.html
+++ b/docs/io.jesi.backpack.http.status.html
@@ -1,3 +1,3 @@
-io.jesi.backpack.http.status documentation
\ No newline at end of file
diff --git a/docs/io.jesi.backpack.macros.html b/docs/io.jesi.backpack.macros.html
index d1e68cb..2354247 100644
--- a/docs/io.jesi.backpack.macros.html
+++ b/docs/io.jesi.backpack.macros.html
@@ -1,11 +1,16 @@
-io.jesi.backpack.macros documentation
Wraps the body in a catch block, returning the result of the body or any thrown exception
catch->nil
macro
(catch->nil & body)
Wraps the body in a catch block, returning all thrown exceptions as nil
condf
macro
(condf v & clauses)
Takes a value, and a set of binary predicate clauses. For each clause (clause v) is evaluated. If it returns logical true, the clause is a match and the result-expr is returned. A single default expression can follow the clauses, and its value will be returned if no clause matches.
Wraps the body in a catch block, returning the result of the body or any thrown exception
catch->nil
macro
(catch->nil & body)
Wraps the body in a catch block, returning all thrown exceptions as nil
cond=
macro
(cond= expr & clauses)
Short for `condp =
condf
macro
(condf v & clauses)
Takes a value, and a set of binary predicate clauses. For each clause (clause v) is evaluated. If it returns logical true, the clause is a match and the result-expr is returned. A single default expression can follow the clauses, and its value will be returned if no clause matches.
(def- symbol)(def- symbol init)(def- symbol doc-string init)
Creates and interns a private var with the name of symbol in the current namespace (*ns*) or locates such a var if it already exists. If init is supplied, it is evaluated, and the root binding of the var is set to the resulting value. If init is not supplied, the root binding of the var is unaffected.
defconsts
macro
(defconsts body-fn & symbols)
Defines a collection of string constant values as individual symbols transforming their values using body-fn.
defkw
macro
(defkw kw)
Defines a symbol as the name of the given keyword in the current namespace
import-vars
macro
(import-vars & imports)
Imports a all symbols (including various metadata) from one namespace into the current namespace. Supports Clojure and ClojureScript. Similar to https://github.com/ztellman/potemkin
+
def-
macro
(def- symbol)(def- symbol init)(def- symbol doc-string init)
Creates and interns a private var with the name of symbol in the current namespace (*ns*) or locates such a var if it already exists. If init is supplied, it is evaluated, and the root binding of the var is set to the resulting value. If init is not supplied, the root binding of the var is unaffected.
defconsts
macro
(defconsts body-fn & symbols)
Defines a collection of constant values as individual symbols transforming their values using body-fn.
Defines a symbol as the name of the given keyword in the current namespace
import-vars
macro
(import-vars & imports)
Imports a all symbols (including various metadata) from one namespace into the current namespace. Supports Clojure and ClojureScript. Similar to https://github.com/ztellman/potemkin
Coerces a value into a UUID if possible, otherwise returns nil
->uuid-or-not
(->uuid-or-not id)
xor
(xor)(xor x)(xor x y)(xor x y & more)
Returns true only if one argument is true
\ No newline at end of file
diff --git a/docs/io.jesi.backpack.number.html b/docs/io.jesi.backpack.number.html
index 025c5a9..0489937 100644
--- a/docs/io.jesi.backpack.number.html
+++ b/docs/io.jesi.backpack.number.html
@@ -1,3 +1,3 @@
-io.jesi.backpack.number documentation
Java’s Integer/MAX_VALUE for consistence use in Clojure(Script) projects
mod
(mod num div)
Modulus of num and div supporting float and decimal values. Truncates toward negative infinity.
round-to
(round-to precision d)
Rounds a given value ‘d’ to the specified ‘precision’
\ No newline at end of file
diff --git a/docs/io.jesi.backpack.random.html b/docs/io.jesi.backpack.random.html
index 77fa9f2..02f788b 100644
--- a/docs/io.jesi.backpack.random.html
+++ b/docs/io.jesi.backpack.random.html
@@ -1,3 +1,3 @@
-io.jesi.backpack.random documentation
Generates a random string alpha-numeric characters [A-Za-z0-9] (24 character length default)
character
(character)
extended-chars
lnglat
(lnglat)
Generates a random [lng lat] value
string
(string)(string size)
Generates a random string of size (24 character length default)
uuid
(uuid)
Generates a random UUID
uuid-str
(uuid-str)
Generates a random UUID string
wkt-linestring
(wkt-linestring)(wkt-linestring min max)
Generates a random WellKnownText linestring value
\ No newline at end of file
diff --git a/docs/io.jesi.backpack.specter.html b/docs/io.jesi.backpack.specter.html
index cebebd3..03eb5be 100644
--- a/docs/io.jesi.backpack.specter.html
+++ b/docs/io.jesi.backpack.specter.html
@@ -1,3 +1,3 @@
-io.jesi.backpack.specter documentation
A spectre recursive path navigator, that collects all paths to the occurrences of leaves that match the given predicate. Does not traverse deeper into the matched structures.
\ No newline at end of file
+io.jesi.backpack.specter documentation
A spectre recursive path navigator, that collects all paths to the occurrences of leaves that match the given predicate. Does not traverse deeper into the matched structures.
\ No newline at end of file
diff --git a/docs/io.jesi.backpack.string.html b/docs/io.jesi.backpack.string.html
index 4037c27..3dddeab 100644
--- a/docs/io.jesi.backpack.string.html
+++ b/docs/io.jesi.backpack.string.html
@@ -1,3 +1,3 @@
-io.jesi.backpack.string documentation