Liking cljdoc? Tell your friends :D

tservice-core.plugins.semver

Clojure implementation of the Semantic Versioning 2.0.0 spec. Parse, validate, sort and modify semantic version strings.

Why do I copy the code into the project? Cannot find the library from clojars.org anymore. Please be aware that the copyright of this code belongs to owainlewis. You can access https://github.com/owainlewis/semver for more details.

Clojure implementation of the Semantic Versioning 2.0.0 spec. Parse, validate, sort and modify semantic version strings.

Why do I copy the code into the project? Cannot find the library from clojars.org anymore.
Please be aware that the copyright of this code belongs to owainlewis. You can access https://github.com/owainlewis/semver for more details.
raw docstring

compare-stringsclj

(compare-strings v1 v2)

Compare two semantic version strings

Compare two semantic version strings
raw docstring

equal?clj

(equal? v1 v2)

Returns true if v1 is equal to v2 else false

Returns true if v1 is equal to v2 else false
raw docstring

increment-majorclj

(increment-major version)

Returns a copy of a given version with the major version incremented

Returns a copy of a given version with the major version incremented
raw docstring

increment-minorclj

(increment-minor version)

Returns a copy of the given version with the minor version incremented

Returns a copy of the given version with the minor version incremented
raw docstring

increment-patchclj

(increment-patch version)

Returns a copy of the given version with the patch version incremented

Returns a copy of the given version with the patch version incremented
raw docstring

newer?clj

(newer? v1 v2)

Returns true if v1 is newer than v2 else false

Returns true if v1 is newer than v2 else false
raw docstring

older?clj

(older? v1 v2)

Returns true if v1 is older than v2 else false

Returns true if v1 is older than v2 else false
raw docstring

parseclj

(parse version)

Parse a semantic version string returning nil if the input is invalid or a Version if the input is valid

Parse a semantic version string returning nil if the input is invalid
or a Version if the input is valid
raw docstring

renderclj

(render version)

Takes a semantic version type and renders it back as a string

Takes a semantic version type and renders it back as a string
raw docstring

snapshot?clj

(snapshot? version)

sortedclj

(sorted versions)

Given a list of semantic version strings, compare them and return them in sorted order with newest versions first

Given a list of semantic version strings, compare them and return them in sorted order
with newest versions first
raw docstring

transformclj

(transform modifier version)

Transform a version string by applying a modifier function This might typically be used to alter the version in some way like incrementing a version part or adding something to the metadata or pre-release parts Example: (transform "1.0.0" increment-major)

Transform a version string by applying a modifier function
This might typically be used to alter the version in some way like incrementing a version part
or adding something to the metadata or pre-release parts
Example:
  (transform "1.0.0" increment-major)
raw docstring

valid?clj

(valid? version)

Returns true if an input string is a valid semantic version string

Returns true if an input string is a valid semantic version string
raw docstring

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

× close