Liking cljdoc? Tell your friends :D

pallet.utils

Utilities used across pallet.

Utilities used across pallet.
raw docstring

apply-mapcljmacro

(apply-map & args)
source

as-stringclj

(as-string arg)

Return the string value of the argument.

Return the string value of the argument.
sourceraw docstring

base64-md5clj

(base64-md5 unsafe-id)

Computes the base64 encoding of the md5 of a string

Computes the base64 encoding of the md5 of a string
sourceraw docstring

classpathclj

(classpath)

Return the classpath File's for the current clojure classloader.

Return the classpath File's for the current clojure classloader.
sourceraw docstring

classpath-jarfilesclj

(classpath-jarfiles)

Returns a sequence of JarFile objects for the JAR files on classpath.

Returns a sequence of JarFile objects for the JAR files on classpath.
sourceraw docstring

classpath-urlsclj

(classpath-urls)

Return the classpath URL's for the current clojure classloader.

Return the classpath URL's for the current clojure classloader.
sourceraw docstring

compare-and-swap!clj

(compare-and-swap! a f & args)

Compare and swap, returning old and new values

Compare and swap, returning old and new values
sourceraw docstring

compiler-exceptioncljmacro

(compiler-exception exception)

Create a compiler exception that wraps a cause and includes source location.

Create a compiler exception that wraps a cause and includes source location.
sourceraw docstring

count-byclj

(count-by key-fn s)

Take a sequence and a key function, and returns a map with the count of each key.

Take a sequence and a key function, and returns a map with the
count of each key.
sourceraw docstring

count-valuesclj

(count-values s)

Take a sequence, and returns a map with the count of each value.

Take a sequence, and returns a map with the count of each value.
sourceraw docstring

deep-mergeclj

(deep-merge & ms)

Recursively merge maps.

Recursively merge maps.
sourceraw docstring

dissoc-if-emptyclj

(dissoc-if-empty m key)

Like clojure.core/dissoc, except it only dissoc's if the value at the keyword is nil.

Like clojure.core/dissoc, except it only dissoc's if the value at the
keyword is nil.
sourceraw docstring

dissoc-keysclj

(dissoc-keys m keys)

Like clojure.core/dissoc, except it takes a vector of keys to remove

Like clojure.core/dissoc, except it takes a vector of keys to remove
sourceraw docstring

file-for-urlclj

(file-for-url url)

Convert a URL to a File.

Convert a URL to a File. 
sourceraw docstring

find-var-with-requireclj

(find-var-with-require sym)
(find-var-with-require ns sym)

Find the var for the given namespace and symbol. If the namespace does not exist, then it will be required. (find-var-with-require 'my.ns 'a-symbol) (find-var-with-require 'my.ns/a-symbol)

If the namespace exists, but can not be loaded, and exception is thrown. If the namespace is loaded, but the symbol is not found, then nil is returned.

Find the var for the given namespace and symbol. If the namespace does
not exist, then it will be required.
    (find-var-with-require 'my.ns 'a-symbol)
    (find-var-with-require 'my.ns/a-symbol)

If the namespace exists, but can not be loaded, and exception is thrown.  If
the namespace is loaded, but the symbol is not found, then nil is returned.
sourceraw docstring

first-lineclj

(first-line s)

Return the first line of a string.

Return the first line of a string.
sourceraw docstring

forward-to-script-libcljmacro

(forward-to-script-lib & symbols)

Forward a script to the new script lib

Forward a script to the new script lib
sourceraw docstring

fwd-to-configurecljmacro

(fwd-to-configure name & [as-name & _])
source

jar-file?clj

(jar-file? file)

Returns true if file is a normal file with a .jar or .JAR extension.

Returns true if file is a normal file with a .jar or .JAR extension.
sourceraw docstring

load-resourceclj

(load-resource name)
source

load-resource-urlclj

(load-resource-url name)
source

local-envcljmacro

(local-env)

Return clojure's local environment as a map of keyword value pairs.

Return clojure's local environment as a map of keyword value pairs.
sourceraw docstring

log-multilinecljmacro

(log-multiline level-kw fmt string)

Log a multiline string in multiple log lines

Log a multiline string in multiple log lines
sourceraw docstring

macro-compiler-exceptioncljmacro

(macro-compiler-exception exception)

Create a compiler exception that wraps a cause and includes source location.

Create a compiler exception that wraps a cause and includes source location.
sourceraw docstring

make-usercljdeprecated

(make-user username
           &
           {:keys [public-key-path private-key-path passphrase password
                   sudo-password no-sudo]
            :as options})

Creates a User record with the given username and options. Generally used in conjunction with admin-user and pallet.api/with-admin-user, or passed to lift or converge as the named :user argument.

Options:

  • :public-key-path
  • :private-key-path
  • :passphrase
  • :password
  • :sudo-password (defaults to :password)
  • :no-sudo
Creates a User record with the given username and options. Generally used
in conjunction with *admin-user* and pallet.api/with-admin-user, or passed
to `lift` or `converge` as the named :user argument.

Options:
 - :public-key-path
 - :private-key-path
 - :passphrase
 - :password
 - :sudo-password (defaults to :password)
 - :no-sudo
sourceraw docstring

map-seqclj

(map-seq m)

Given an argument, returns the argument, or nil if passed an empty map.

Given an argument, returns the argument, or nil if passed an empty map.
sourceraw docstring

map-with-keys-as-symbolsclj

(map-with-keys-as-symbols m)

Produce a map that is the same as m, but with all keys are converted to symbols.

Produce a map that is the same as m, but with all keys are converted to
symbols.
sourceraw docstring

maybe-assocclj

(maybe-assoc m k v)

'Assoc a value in an associative structure, where k is a key and v is the value to assoc. The assoc only occurs if the value is non-nil.

'Assoc a value in an associative structure, where k is a key and v is the
value to assoc. The assoc only occurs if the value is non-nil.
sourceraw docstring

maybe-update-inclj

(maybe-update-in m [& ks] f & args)

'Updates' a value in a nested associative structure, where ks is a sequence of keys and f is a function that will take the old value and any supplied args and return the new value, and returns a new nested structure. If any levels do not exist, hash-maps will be created only if the update function returns a non-nil value. If the update function returns nil, the map is returned unmodified.

'Updates' a value in a nested associative structure, where ks is a
sequence of keys and f is a function that will take the old value
and any supplied args and return the new value, and returns a new
nested structure.  If any levels do not exist, hash-maps will be
created only if the update function returns a non-nil value. If
the update function returns nil, the map is returned unmodified.
sourceraw docstring

middlewarecljmacro

(middleware & forms)

Build a middleware processing pipeline from the specified forms. The result is a middleware.

Build a middleware processing pipeline from the specified forms.
The result is a middleware.
sourceraw docstring

obfuscateclj

(obfuscate pw)

Obfuscate a password, by replacing every character by an asterisk.

Obfuscate a password, by replacing every character by an asterisk.
sourceraw docstring

pipecljmacro

(pipe & forms)

Build a session processing pipeline from the specified forms.

Build a session processing pipeline from the specified forms.
sourceraw docstring

pprint-linesclj

(pprint-lines s)

Pretty print a multiline string

Pretty print a multiline string
sourceraw docstring

quotedclj

(quoted s)

Return the string value of the argument in quotes.

Return the string value of the argument in quotes.
sourceraw docstring

resource-pathclj

(resource-path name)
source

resource-propertiesclj

(resource-properties path)

Given a resource path, load it as a java properties file. Returns nil if resource not found.

Given a resource `path`, load it as a java properties file.
Returns nil if resource not found.
sourceraw docstring

slurp-as-byte-arrayclj

(slurp-as-byte-array file)

Read the given file as a byte array.

Read the given file as a byte array.
sourceraw docstring

tmpdirclj

(tmpdir)

Create a temporary directory.

Create a temporary directory.
sourceraw docstring

tmpfileclj

(tmpfile)
(tmpfile dir)

Create a temporary file

Create a temporary file
sourceraw docstring

total-order-mergeclj

(total-order-merge & seqs)

Merge the seqs sequences so that the ordering of the elements in result is the same as the ordering of elements present in each of the specified sequences. Throws an exception if no ordering can be found that satisfies the ordering in all the seqs.

Merge the `seqs` sequences so that the ordering of the elements in result is
the same as the ordering of elements present in each of the specified
sequences.  Throws an exception if no ordering can be found that satisfies the
ordering in all the `seqs`.
sourceraw docstring

underscoreclj

(underscore s)
source

with-redefcljmacro

(with-redef [& bindings] & body)
source

with-temp-filecljmacro

(with-temp-file [varname content] & body)

Create a block where varname is a temporary File containing content.

Create a block where `varname` is a temporary `File` containing `content`.
sourceraw docstring

with-temporarycljmacro

(with-temporary bindings & body)

A block scope allowing multiple bindings to expressions. Each binding will have the member function delete called on it.

A block scope allowing multiple bindings to expressions.  Each binding will
have the member function `delete` called on it.
sourceraw docstring

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

× close