Liking cljdoc? Tell your friends :D

hara.core.version


*lookup*clj


+order+clj


+pattern+clj


+qualifiers+clj


equal?clj

(equal? a b)

compares if two versions are the same

(equal? "1.2-final" "1.2") => true

compares if two versions are the same

(equal? "1.2-final" "1.2")
=> true
raw docstring

newer?clj

(newer? a b)

returns true if the the first argument is newer than the second

(newer? "1.2" "1.0") => true

(newer? "1.2.2" "1.0.4") => true

returns true if the the first argument is newer than the second

(newer? "1.2" "1.0")
=> true

(newer? "1.2.2" "1.0.4")
=> true
raw docstring

not-equal?clj

(not-equal? a b)

not-newer?clj

(not-newer? a b)

not-older?clj

(not-older? a b)

older?clj

(older? a b)

returns true if the the first argument is older than the second

(older? "1.0-alpha" "1.0-beta") => true

(older? "1.0-rc1" "1.0") => true

returns true if the the first argument is older than the second

(older? "1.0-alpha" "1.0-beta")
=> true

(older? "1.0-rc1" "1.0")
=> true
raw docstring

orderclj


parseclj

(parse s)

parses a version input (parse "1.0.0-final") => {:major 1, :minor 0, :incremental 0, :qualifier 6, :release "final", :build ""}

(parse "1.0.0-alpha+build.123") => {:major 1, :minor 0, :incremental 0, :qualifier 0, :release "alpha", :build "build.123"}

parses a version input
(parse "1.0.0-final")
=> {:major 1, :minor 0, :incremental 0, :qualifier 6, :release "final", :build ""}

(parse "1.0.0-alpha+build.123")
=> {:major 1,
    :minor 0,
    :incremental 0,
    :qualifier 0,
    :release "alpha",
    :build "build.123"}
raw docstring

parse-numberclj

(parse-number s)

parse a number from string input

(parse-number "1") => 1

parse a number from string input

(parse-number "1") => 1
raw docstring

parse-qualifierclj

(parse-qualifier release build)

parses a qualifier from string input

(parse-qualifier "" "") => 6

(parse-qualifier "alpha" "") => 0

parses a qualifier from string input

(parse-qualifier "" "") => 6

(parse-qualifier "alpha" "") => 0
raw docstring

versionclj

(version x)

like parse but also accepts maps

(version "1.0-RC5") => {:major 1, :minor 0, :incremental nil, :qualifier 3, :release "rc5", :build ""}

like parse but also accepts maps

(version "1.0-RC5")
=> {:major 1, :minor 0, :incremental nil, :qualifier 3, :release "rc5", :build ""}
raw docstring

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

× close