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
sourceraw 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
sourceraw 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
sourceraw 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
sourceraw 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
sourceraw 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
sourceraw 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
sourceraw 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
sourceraw 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
sourceraw docstring

snapshot?clj

(snapshot? version)
source

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
sourceraw 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)
sourceraw 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
sourceraw docstring

Versionclj

source

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

× close