Liking cljdoc? Tell your friends :D

grimoire.util

A namespace of stupid little helper bits including the Grimoire munge operations.

A namespace of stupid little helper bits including the Grimoire munge operations.
raw docstring

-abbrevsclj


clojure-version->cmp-keyclj

(clojure-version->cmp-key version-str)

Create a comparison key from a Clojure version string, as returned from function clojure.core/clojure-version. The key is a vector of integers and strings, and two such keys may be compared via clojure.core/compare to get the correct relative order of the two Clojure versions.

Makes simplifying assumption that: x.y.z-alpha<n> < x.y.z-beta<m> < x.y.z-RC<p> < x.y.z.

Note that this was not the time order of release for some 1.5.0-beta and 1.5.0-RC releases, historically, as they switched from 1.5.0-RC releases back to 1.5.0-beta, and then back to 1.5.0-RC again. Hopefully that will not happen again.

Stolen from AndyF with thanks.

Create a comparison key from a Clojure version string, as returned
from function clojure.core/clojure-version.  The key is a vector of
integers and strings, and two such keys may be compared via
clojure.core/compare to get the correct relative order of the two
Clojure versions.

Makes simplifying assumption that:
x.y.z-alpha<n> < x.y.z-beta<m> < x.y.z-RC<p> < x.y.z.

Note that this was not the time order of release for some 1.5.0-beta
and 1.5.0-RC releases, historically, as they switched from 1.5.0-RC
releases back to 1.5.0-beta, and then back to 1.5.0-RC again.
Hopefully that will not happen again.

Stolen from AndyF with thanks.
raw docstring

edn-read-string-with-readersclj

(edn-read-string-with-readers s)

Read a string with clojure.edn/read-string and additional reader functions installed.

Currently the only additional reader function is the default reader function, which will return a tuple [:cant-read <tag symbol> <raw value>].

Read a string with clojure.edn/read-string and additional reader functions
installed.

Currently the only additional reader function is the default reader function,
which will return a tuple [:cant-read <tag symbol> <raw value>].
raw docstring

mungeclj

(munge s)

This is the munge function as used by the current version of Grimoire. Should only be applied to symbols. Namespaces, packages, groups and soforth need not be name munged.

Note that this is NOT a full isomorphism, since it lacks an escape.

This is the munge function as used by the current version of Grimoire. Should only be applied to
symbols. Namespaces, packages, groups and soforth need not be name munged.

Note that this is _NOT_ a full isomorphism, since it lacks an escape.
raw docstring

normalize-platformclj


normalize-versionclj

(normalize-version x)

unmungeclj

(unmunge s)

Inverts #'munge.

Note that this is NOT a full isomorphism, since it lacks an escape.

Inverts #'munge.

Note that this is _NOT_ a full isomorphism, since it lacks an escape.
raw docstring

update-mungeclj

(update-munge s)

This function attempts to transform the legacy munging of names into the modern munging above. Note that update-munge is not an unmunge operation.

This function attempts to transform the legacy munging of names
into the modern munging above. Note that update-munge is _not_ an
unmunge operation.
raw docstring

url-mungeclj

(url-munge s)

This is the old implementation of #'munge

It's just url-encoding augmented with a specification illegal but decoder supported mapping of . -> %2E, which is retained in the codebase for compatability reasons with the existing file store.

This is the old implementation of #'munge

It's just url-encoding augmented with a specification illegal but decoder supported mapping of
. -> %2E, which is retained in the codebase for compatability reasons with the existing file
store.
raw docstring

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

× close