Liking cljdoc? Tell your friends :D

hara.module.artifact


artifact

(artifact x)
(artifact type x)

converts various artifact formats

(artifact :string '[hara/hara "2.4.0"]) => "hara:hara:jar:2.4.0"

(artifact :path "hara:hara:2.4.0") => (str base/local-repo "/hara/hara/2.4.0/hara-2.4.0.jar")

converts various artifact formats

(artifact :string '[hara/hara "2.4.0"])
=> "hara:hara:jar:2.4.0"

(artifact :path "hara:hara:2.4.0")
=> (str base/*local-repo*
        "/hara/hara/2.4.0/hara-2.4.0.jar")
raw docstring

artifact-coord

(artifact-coord x)
(artifact-coord _ x)

converts an artifact in any format to the coord representation

(artifact-coord "hara:hara:jar:2.4.0") => '[hara/hara "2.4.0"]

converts an artifact in any format to the coord representation

(artifact-coord "hara:hara:jar:2.4.0")
=> '[hara/hara "2.4.0"]
raw docstring

artifact-default

(artifact-default x)
(artifact-default _ x)

converts an artifact in any format to the default representation

(artifact-default '[hara/hara "2.4.0"]) => rep?

converts an artifact in any format to the default representation

(artifact-default '[hara/hara "2.4.0"])
=> rep?
raw docstring

artifact-path

(artifact-path x)
(artifact-path _ x)

converts an artifact in any format to the path representation

(artifact-path '[hara/hara "2.4.0"]) => "<.m2>/hara/hara/2.4.0/hara-2.4.0.jar"

converts an artifact in any format to the path representation

(artifact-path '[hara/hara "2.4.0"])
=> "<.m2>/hara/hara/2.4.0/hara-2.4.0.jar"
raw docstring

artifact-string

(artifact-string x)
(artifact-string _ x)

converts an artifact in any format to the string representation

(artifact-string '[hara/hara "2.4.0"]) => "hara:hara:jar:2.4.0"

converts an artifact in any format to the string representation

(artifact-string '[hara/hara "2.4.0"])
=> "hara:hara:jar:2.4.0"
raw docstring

artifact-symbol

(artifact-symbol x)
(artifact-symbol _ x)

converts an artifact in any format to the symbol representation

(artifact-symbol '[hara/hara "2.4.0"]) => 'hara/hara

converts an artifact in any format to the symbol representation

(artifact-symbol '[hara/hara "2.4.0"])
=> 'hara/hara
raw docstring

coord->rep

(coord->rep [name version & {:keys [scope exclusions]}])

converts a coord to a rep instance

(coord->rep '[hara/hara "2.4.0"]) => (contains {:group "hara" :artifact "hara" :version "2.4.0"})

converts a coord to a rep instance

(coord->rep '[hara/hara "2.4.0"])
=> (contains {:group "hara"
              :artifact "hara"
              :version "2.4.0"})
raw docstring

coord?

(coord? obj)

checks for a valid coordinate

(coord? '[org.clojure/clojure "1.8.0"]) => true

(coord? '[1 2 3]) => false

checks for a valid coordinate

(coord? '[org.clojure/clojure "1.8.0"]) => true

(coord? '[1 2 3]) => false
raw docstring

path->rep

(path->rep x)

converts a path to a rep instance

(path->rep (str base/local-repo "/hara/hara/2.4.0/hara-2.4.0.jar")) => (contains {:group "hara" :artifact "hara" :version "2.4.0"})

converts a path to a rep instance

(path->rep (str base/*local-repo* "/hara/hara/2.4.0/hara-2.4.0.jar"))
=> (contains {:group "hara"
              :artifact "hara"
              :version "2.4.0"})
raw docstring

rep

(rep obj)

converts various formats to a rep

(str (rep '[hara/hara "2.4.0"])) => "hara:hara:jar:2.4.0"

(str (rep "hara:hara:2.4.0")) => "hara:hara:jar:2.4.0"

converts various formats to a rep

(str (rep '[hara/hara "2.4.0"]))
=> "hara:hara:jar:2.4.0"

(str (rep "hara:hara:2.4.0"))
=> "hara:hara:jar:2.4.0"
raw docstring

rep->coord

(rep->coord {:keys [group artifact version exclusions scope]})

encodes the rep to a coordinate

(-> {:group "hara" :artifact "hara" :version "2.4.0"} (map->Rep) (rep->coord)) => '[hara/hara "2.4.0"]

encodes the rep to a coordinate

(-> {:group "hara" :artifact "hara" :version "2.4.0"}
    (map->Rep)
    (rep->coord))
=> '[hara/hara "2.4.0"]
raw docstring

rep->path

(rep->path {:keys [group artifact version extension]})

encodes the rep to a path

(-> {:group "hara" :artifact "hara" :version "2.4.0"} (map->Rep) (rep->path)) => "<.m2>/hara/hara/2.4.0/hara-2.4.0.jar"

encodes the rep to a path

(-> {:group "hara" :artifact "hara" :version "2.4.0"}
    (map->Rep)
    (rep->path))
=> "<.m2>/hara/hara/2.4.0/hara-2.4.0.jar"
raw docstring

rep->string

(rep->string {:keys [group artifact extension version]})

encodes the rep to a string

(-> {:group "hara" :artifact "hara" :version "2.4.0"} (map->Rep) (rep->string)) => "hara:hara:2.4.0"

encodes the rep to a string

(-> {:group "hara" :artifact "hara" :version "2.4.0"}
    (map->Rep)
    (rep->string))
=> "hara:hara:2.4.0"
raw docstring

rep-default

(rep-default x)

creates the default representation of a artifact

(into {} (rep-default "hara:hara:2.4.0")) => {:properties {}, :group "hara", :classifier nil, :file nil, :exclusions nil, :scope nil, :extension "jar", :artifact "hara", :version "2.4.0"}

creates the default representation of a artifact

(into {} (rep-default "hara:hara:2.4.0"))
=> {:properties {},
    :group "hara",
    :classifier nil,
    :file nil,
    :exclusions nil,
    :scope nil,
    :extension "jar",
   :artifact "hara",
    :version "2.4.0"}
raw docstring

rep?

(rep? obj)

checks if an object is of type hara.module.artifact.Rep

(rep? (rep "hara:hara:2.4.0")) => true

checks if an object is of type `hara.module.artifact.Rep`

(rep? (rep "hara:hara:2.4.0"))
=> true
raw docstring

string->rep

(string->rep s)

converts a string to a rep instance

(string->rep "hara:hara:2.4.0") => (contains {:group "hara" :artifact "hara" :version "2.4.0"})

converts a string to a rep instance

(string->rep "hara:hara:2.4.0")
=> (contains {:group "hara"
              :artifact "hara"
              :version "2.4.0"})
raw docstring

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

× close