Liking cljdoc? Tell your friends :D

refactor-nrepl.core


build-artifact?clj

(build-artifact? path-or-file)
source

clj-extension?clj

(clj-extension? path)
source

clj-file?clj

(clj-file? path-or-file)
source

cljc-extension?clj

(cljc-extension? path)
source

cljc-file?clj

(cljc-file? path-or-file)
source

cljs-extension?clj

(cljs-extension? path)
source

cljs-file?clj

(cljs-file? path-or-file)
source

dirs-on-classpathclj

(dirs-on-classpath)

Return all dirs on classpath, filtering out our inlined deps directory and paths matching :ignore-paths specified in config. Follows the semantics of orchard classpath.

Return all dirs on classpath, filtering out our inlined deps
directory and paths matching :ignore-paths specified in config.
Follows the semantics of orchard classpath.
sourceraw docstring

extract-gen-class-methods-metaclj

(extract-gen-class-methods-meta ns-form)

Retrieve the metadata relative to :methods in the :gen-class top level component.

Returns nil if there is no :gen-class, or if there is no :methods inside :gen-class

.indexOf returns -1 if not found, and since the structure we are looking for comes after, by 'incing' by default we can just check for zero?

Retrieve the metadata relative to :methods in the :gen-class top
level component.

Returns nil if there is no :gen-class, or if there is no :methods
inside :gen-class

.indexOf returns -1 if not found, and since the structure we are
looking for comes after, by 'incing' by default we can just check
for zero?
sourceraw docstring

extract-ns-metaclj

(extract-ns-meta file-content)

Retrieve the metadata for the ns, if there is any.

By parsing the ns as a string, and reading the metadata off it, all the metadata introduced by the compiler or clojure.test is not printed back out

Retrieve the metadata for the ns, if there is any.

By parsing the ns as a string, and reading the metadata off it, all
the metadata introduced by the compiler or clojure.test is not
printed back out
sourceraw docstring

file->dialectclj

(file->dialect path-or-file)

Return the clojure dialect used in the file f.

The dialect is either :clj, :cljs or :cljc.

Return the clojure dialect used in the file f.

The dialect is either :clj, :cljs or :cljc.
sourceraw docstring

file-content-sans-nsclj

(file-content-sans-ns file-content)
(file-content-sans-ns file-content dialect)

Read the content of file after the ns.

Any whitespace in the file is preserved, including the conventional blank line after the ns form, before the rest of the file content.

The default value of dialect is :clj.

Read the content of file after the ns.

Any whitespace in the file is preserved, including the conventional
blank line after the ns form, before the rest of the file content.

The default value of dialect is :clj.
sourceraw docstring

find-in-dirclj

(find-in-dir pred dir)

Searches recursively under dir for files matching (pred ^File file).

Note that files which are non-existent, hidden or build-artifacts are pruned by this function.

Searches recursively under dir for files matching (pred ^File file).

Note that files which are non-existent, hidden or build-artifacts
are pruned by this function.
sourceraw docstring

find-in-projectclj

(find-in-project pred)
(find-in-project pred dirs)

Return the files in the project satisfying (pred ^File file).

Return the files in the project satisfying (pred ^File file).
sourceraw docstring

fully-qualified?clj

(fully-qualified? symbol-or-keyword)
source

fully-qualifyclj

(fully-qualify ns name)

Create a fully qualified name from name and ns.

Create a fully qualified name from name and ns.
sourceraw docstring

get-ns-componentclj

(get-ns-component ns type)

Extracts a sub-component from the ns declaration.

type is a toplevel keyword in the ns form e.g. :require or :use.

Extracts a sub-component from the ns declaration.

type is a toplevel keyword in the ns form e.g. :require or :use.
sourceraw docstring

ignore-dir-on-classpath?clj

(ignore-dir-on-classpath? path)
source

index-of-componentclj

(index-of-component ns-form type)
source

normalize-var-nameclj

(normalize-var-name sym-str)
source

ns-form-from-stringclj

(ns-form-from-string file-content)
(ns-form-from-string dialect file-content)
source

ns-from-stringclj

(ns-from-string file-content)

Retrieve the symbol naming the ns from file-content.

Retrieve the symbol naming the ns from file-content.
sourceraw docstring

ns-name-from-readableclj

(ns-name-from-readable readable)

Call slurp on readable and extract the ns-name from the content.

Call slurp on readable and extract the ns-name from the content.
sourceraw docstring

path->namespaceclj

(path->namespace path)
(path->namespace no-error path)

Read the ns form found at PATH and return the namespace object for that ns.

if NO-ERROR is passed just return nil instead of an exception if we can't successfully read an ns form.

Read the ns form found at PATH and return the namespace object for
that ns.

if NO-ERROR is passed just return nil instead of an exception if we
can't successfully read an ns form.
sourceraw docstring

prefixclj

(prefix fully-qualified-name)

java.util.Date -> java.util

clojure.walk/walk -> clojure.walk :clojure.core/kw -> kw

java.util.Date -> java.util

clojure.walk/walk -> clojure.walk
:clojure.core/kw -> kw
sourceraw docstring

prefix-form?clj

(prefix-form? form)

Does the form represent a libspec using prefix notation like: [prefix libspec1 libspec2 ...] ?

Does the form represent a libspec using prefix notation
like: [prefix libspec1 libspec2 ...] ?
sourceraw docstring

project-rootclj

(project-root)
(project-root path-or-file-in-project)

Return the project root directory.

If path-or-file-in-project is provided it should be a project file to use as a starting point. We search anything above this dir, until we reach the file system root. Default value is the property user.dir.

Return the project root directory.

If path-or-file-in-project is provided it should be a project file
to use as a starting point. We search anything above this dir, until
we reach the file system root. Default value is the property
`user.dir`.
sourceraw docstring

read-ns-formclj

(read-ns-form path)
(read-ns-form dialect path)
source

read-ns-form-with-metaclj

(read-ns-form-with-meta path)
(read-ns-form-with-meta dialect path)

Read the ns form found at PATH.

Dialect is either :clj or :cljs.

Read the ns form found at PATH.

Dialect is either :clj or :cljs.
sourceraw docstring

require-lockclj

source

safe-find-nsclj

(safe-find-ns n ignore-error?)
source

source-dirs-on-classpathclj

(source-dirs-on-classpath)

Like #'dirs-on-classpath, but restricted to dirs that look like (interesting) source/test dirs.

Like `#'dirs-on-classpath`, but restricted to dirs that look like
(interesting) source/test dirs.
sourceraw docstring

source-file?clj

(source-file? path-or-file)

True for clj, cljs or cljc files.

A list of data files are excluded, e.g. data_readers.clj. Files without ns form are excluded too.

True for clj, cljs or cljc files.

A list of data files are excluded, e.g. data_readers.clj.
Files without ns form are excluded too.
sourceraw docstring

source-files-with-clj-like-extensionclj

(source-files-with-clj-like-extension ignore-errors?)
(source-files-with-clj-like-extension ignore-errors? dirs)

Finds files with .clj* extension in the project, without inspecting them.

Meant as a particularly fast operation (as it doesn't slurp files).

Finds files with .clj* extension in the project, without inspecting them.

Meant as a particularly fast operation (as it doesn't slurp files).
sourceraw docstring

strip-reader-macrosclj

(strip-reader-macros symbol-or-string)

Strip reader macros like #' and . (as in '(Date.)') from symbol-or-string.

Strip reader macros like #' and . (as in '(Date.)') from
symbol-or-string.
sourceraw docstring

suffixclj

(suffix fully-qualified-name)

java.util.Date -> Date java.text.Normalizer$Form/NFD => Normalizer SomeClass$InnerClass$InnerInnerClass => SomeClass$InnerClass$InnerInnerClass SomeClass$InnerClass => SomeClass$InnerClass

clojure.core/str -> str

java.util.Date -> Date
java.text.Normalizer$Form/NFD => Normalizer
SomeClass$InnerClass$InnerInnerClass => SomeClass$InnerClass$InnerInnerClass
SomeClass$InnerClass => SomeClass$InnerClass

clojure.core/str -> str
sourceraw docstring

throw-unless-clj-fileclj

(throw-unless-clj-file file-path)
source

versionclj

(version)
source

with-clojure-version->=cljmacro

(with-clojure-version->= {:keys [major minor] :as _clojure-version} & body)

Guard the evaluation of body with a test on the current clojure version.

Guard the evaluation of `body` with a test on the current clojure version.
sourceraw docstring

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

× close