Liking cljdoc? Tell your friends :D

orchard.meta

Utility functions for extracting and manipulating metadata.

Utility functions for extracting and manipulating metadata.
raw docstring

format-specclj

(format-spec fnspec)

Return sequence of [role spec-description] pairs.

Return sequence of [role spec-description] pairs.
sourceraw docstring

macroexpand-allclj

(macroexpand-all form & [original-key])

Like clojure.walk/macroexpand-all, but preserves and macroexpands metadata. Also store the original form (unexpanded and stripped of metadata) in the metadata of the expanded form under original-key.

Like `clojure.walk/macroexpand-all`, but preserves and macroexpands
metadata. Also store the original form (unexpanded and stripped of
metadata) in the metadata of the expanded form under original-key.
sourceraw docstring

merge-metaclj

(merge-meta obj & metamaps)

Non-throwing version of (vary-meta obj merge metamap-1 metamap-2 ...). Like vary-meta, this only applies to immutable objects. For instance, this function does nothing on atoms, because the metadata of an atom is part of the atom itself and can only be changed destructively.

Non-throwing version of (vary-meta obj merge metamap-1 metamap-2 ...).
Like `vary-meta`, this only applies to immutable objects. For
instance, this function does nothing on atoms, because the metadata
of an `atom` is part of the atom itself and can only be changed
destructively.
sourceraw docstring

merge-meta-for-indirect-var-cljclj

(merge-meta-for-indirect-var-clj target-map var-ref)

If var-ref is a var that proxies another var (expressed as a var, or as a symbol denoting a var), and var-ref lacks metadata that is present in its proxy var, copies metadata from the proxied var to var-ref.

This is useful for when Clojure users code e.g. (def foo bar), where bar has a docstring, and for whatever reason, they do not wish to keep in sync the docstring from #'bar to #'foo manually.

Only important, safe-to-copy metadata is possibly copied: :doc, :arglists, :style/indent...

If `var-ref` is a var that proxies another var (expressed as a var, or as a symbol denoting a var),
and `var-ref` lacks metadata that is present in its proxy var,
copies metadata from the proxied var to `var-ref`.

This is useful for when Clojure users code e.g. `(def foo bar)`, where `bar` has a docstring,
and for whatever reason, they do not wish to keep in sync the docstring from #'bar to #'foo manually.

Only important, safe-to-copy metadata is possibly copied: `:doc`, `:arglists`, `:style/indent`...
sourceraw docstring

merge-meta-for-indirect-var-cljsclj

(merge-meta-for-indirect-var-cljs cljs-env var-map)

If var-map describes a var that proxies another var (expressed as a symbol denoting a var), and var-map lacks metadata that is present in its indirect var, copies metadata from the proxied var to var-map.

This is useful for when Clojure users code e.g. (def foo bar), where bar has a docstring, and for whatever reason, they do not wish to keep in sync the docstring from #'bar to #'foo manually.

Only important, safe-to-copy metadata is possibly copied: :doc, :arglists, :style/indent...

If `var-map` describes a var that proxies another var (expressed as a symbol denoting a var),
and `var-map` lacks metadata that is present in its indirect var,
copies metadata from the proxied var to `var-map`.

This is useful for when Clojure users code e.g. `(def foo bar)`, where `bar` has a docstring,
and for whatever reason, they do not wish to keep in sync the docstring from #'bar to #'foo manually.

Only important, safe-to-copy metadata is possibly copied: `:doc`, `:arglists`, `:style/indent`...
sourceraw docstring

meta+clj

(meta+ v)

Return special form or var's meta.

Return special form or var's meta.
sourceraw docstring

ns-fileclj

(ns-file ns)

Finds the path to the file defining this ns

Finds the path to the file defining this `ns`
sourceraw docstring

ns-metaclj

(ns-meta ns)
source

repl-special-metaclj

Return the REPL specials info. Memoized.

Return the REPL specials info. Memoized.
sourceraw docstring

repl-special-meta*clj

(repl-special-meta* sym)

Return the REPL specials info.

Return the REPL specials info.
sourceraw docstring

resolve-aliasesclj

(resolve-aliases ns)

Retrieve the ns aliases for ns. The function is a simple wrapper around clojure.core/ns-alias.

Retrieve the ns aliases for `ns`.
The function is a simple wrapper around `clojure.core/ns-alias`.
sourceraw docstring

resolve-varclj

(resolve-var ns sym)

Resolve ns and sym to a var. The function is a simple wrapper around clojure.core/ns-resolve.

Resolve `ns` and `sym` to a var.
The function is a simple wrapper around `clojure.core/ns-resolve`.
sourceraw docstring

special-sub-symbsclj

source

special-sym-metaclj

(special-sym-meta sym)

Return info for the symbol if it's a special-symbol?, or nil otherwise.

Return info for the symbol if it's a special-symbol?, or nil otherwise.
sourceraw docstring

strip-metaclj

(strip-meta form)
(strip-meta form keys)

Strip meta from form. If keys are provided, strip only those keys.

Strip meta from form.
If keys are provided, strip only those keys.
sourceraw docstring

var-codeclj

(var-code v & {:keys [var-meta-fn] :or {var-meta-fn var-meta}})

Find the source of the var v. Return a map of the var's metadata (:file, :line, :column, etc.) as well as:

  • :form : The form, as read by clojure.core/read, and
  • :code : The source code of the form Return nil if the source of the var cannot be found.
Find the source of the var `v`.
Return a map of the var's metadata (:file, :line, :column, etc.) as well as:
  - :form : The form, as read by `clojure.core/read`, and
  - :code : The source code of the form
Return nil if the source of the var cannot be found.
sourceraw docstring

var-docclj

(var-doc v)
(var-doc n v)

Return special form or var's docstring, optionally limiting the number of sentences returned to n.

Return special form or var's docstring, optionally limiting the number of
sentences returned to n.
sourceraw docstring

var-metaclj

(var-meta v)
(var-meta v allowlist)

Return a map of metadata for var v. If allowlist is missing, use var-meta-allowlist.

Return a map of metadata for var v.
If `allowlist` is missing, use `var-meta-allowlist`.
sourceraw docstring

var-meta-allowlistclj

source

var-meta-whitelistcljdeprecated

source

var-nameclj

(var-name v)

Return special form or var's namespace-qualified name as string.

Return special form or var's namespace-qualified name as string.
sourceraw docstring

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

× close