std.lib.env
close
added in 3.0
(close obj)
closes any object implementing java.io.Closable
dbg
macro
added in 4.0
(dbg & body)
dbg-global
added in 4.0
(dbg-global)(dbg-global flag)
dbg-print
added in 4.0
(dbg-print ns-str {:keys [line column]} & args)
dbg:add-filters
added in 4.0
(dbg:add-filters & filters)
dbg:remove-filters
added in 4.0
(dbg:remove-filters & filters)
dev?
added in 3.0
(dev?)
checks if current environment is dev
do:pl
macro
added in 4.0
(do:pl v)
do:pp
macro
added in 4.0
(do:pp v)
do:prn
macro
added in 4.0
(do:prn & args)
docker-daemon-available?
added in 4.0
(docker-daemon-available?)
checks if the docker daemon is reachable
explode
macro
added in 3.0
(explode & body)
prints the stacktrace for an exception
(explode (throw (ex-info “Error” {})))
local
added in 3.0
(local k & args)
applies the local function
local:clear
added in 3.0
(local:clear k & more)
clears the local functions
local:set
added in 3.0
(local:set k v & more)
match-filter
added in 4.0
(match-filter filt id)
matches given a range of filters
meter
macro
added in 3.0
(meter label & body)
meter-out
macro
added in 4.0
(meter-out & body)
measures and output meter
ns-get
added in 3.0
(ns-get sym)(ns-get ns k)
gets a symbol in the current namespace
ns-sym
added in 3.0
(ns-sym)
returns the namespace symbol
p
added in 3.0
(p & args)
shortcut to (local :println)
pl
macro
added in 3.0
(pl body)(pl body range)
pl-add-lines
added in 3.0
(pl-add-lines body)(pl-add-lines body [start end])(pl-add-lines body [start end] [pad-h pad-v])
pl:fn
macro
added in 4.0
(pl:fn)
pp
macro
added in 3.0
(pp & body)
shortcut to (local :pprint)
pp-fn
added in 4.0
(pp-fn & body)
pp-str
added in 4.0
(pp-str & args)
pr
added in 3.0
(pr & args)
shortcut to (local :println)
prf
added in 4.0
(prf v & [no-pad])
pretty prints with format
prfn
macro
added in 3.0
(prfn & body)
prn but also includes namespace and file info
prn
macro
added in 3.0
(prn & body)
prn but also includes namespace and file info
prn:fn
macro
added in 4.0
(prn:fn)
program-exists?
added in 4.0
(program-exists? exec)
checks if an executable exists on PATH
(program-exists? “ls”) => true
program-version
added in 4.0
(program-version exec)(program-version exec args)
returns the version output of a program, or nil if unavailable
(program-version “ls”) => string?
require
added in 3.0
(require sym)
a concurrency safe require
sys:ns-dir
added in 4.0
(sys:ns-dir)(sys:ns-dir ns)
sys:ns-file
added in 4.0
(sys:ns-file)(sys:ns-file ns)
sys:ns-url
added in 4.0
(sys:ns-url)(sys:ns-url ns)
sys:resource
added in 3.0
(sys:resource n)(sys:resource n loader)
finds a resource on class path
sys:resource-cached
added in 4.0
(sys:resource-cached atom path f)
caches the operation on a resource call
sys:resource-content
added in 3.0
(sys:resource-content path)
throwable-string
added in 3.0
(throwable-string t)
creates a string from a throwable
(throwable-string (ex-info “ERROR” {})) => string?
version-ints
added in 4.0
(version-ints s)
parses a version string into a vector of integers
(version-ints “docker version 24.0.7, build afdd53b”) => 24 0 7
version>=
added in 4.0
(version>= a b)
checks if version a is greater than or equal to version b. Accepts version strings or integer vectors.
(version>= “1.2.3” “1.2.0”) => true
with-out-str
macro
added in 3.0
(with-out-str & body)
gets the local string
(print/with-out-str (print/print “hello”)) => “hello”
with-system
macro
added in 3.0
(with-system & body)
with system print instead of local
with:dbg
macro
added in 4.0
(with:dbg flag & body)
wrap-print
(wrap-print f & [format-fn])