Liking cljdoc? Tell your friends :D

scarlet.anyver

Parse and compare generic version strings.

Does not assume any versioning scheme such as Semantic Versioning, but simply interprets sequences of digits and sequences of letters as parts, ignoring punctuation and whitespace.

Compares parts lexicographically, filling shorter versions with nil. Types are compared as int > nil > string. That means that 2.1.0 is greater than 2.1, and 2.1 is greater than 2.1-alpha2.

Parse and compare generic version strings.

Does not assume any versioning scheme such as Semantic Versioning, but
simply interprets sequences of digits and sequences of letters as parts,
ignoring punctuation and whitespace.

Compares parts lexicographically, filling shorter versions with `nil`.
Types are compared as `int > nil > string`.  That means that `2.1.0` is
greater than `2.1`, and `2.1` is greater than `2.1-alpha2`.
raw docstring

earlier?clj/s

(earlier? x)
(earlier? x y)
(earlier? x y & more)

Returns true if x is earlier than y, false otherwise.

Returns true if `x` is earlier than `y`, false otherwise.
sourceraw docstring

empty-versionclj/s

source

later?clj/s

(later? x)
(later? x y)
(later? x y & more)

Returns true if x is later than y, false otherwise.

Returns true if `x` is later than `y`, false otherwise.
sourceraw docstring

latestclj/s

(latest coll)

Returns the latest version in coll.

Returns the latest version in `coll`.
sourceraw docstring

parseclj/s

(parse s)

Parse s as version.

Parse `s` as version.
sourceraw docstring

versionclj/s

(version x)

Coerce x to version.

Coerce `x` to version.
sourceraw docstring

version-compareclj/s

(version-compare x y)

Coerces and compares two versions x and y.

Coerces and compares two versions `x` and `y`.
sourceraw docstring

version-sortclj/s

(version-sort coll)

Sort a collection of versions.

Sort a collection of versions.
sourceraw docstring

version?clj/s

(version? x)

Returns true if x is an instance of Version.

Returns true if `x` is an instance of `Version`.
sourceraw docstring

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

× close