Skip to content
The semantic versioner for V
V Other
  1. V 99.0%
  2. Other 1.0%
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows
.dockerignore
.gitignore
Dockerfile
LICENSE.md
README.md
compare.v
parse.v
range.v
semver.v
semver_test.v
util.v
v.mod

README.md

semver

A library for working with versions in semver format.

Usage

import semver

fn main() {
    ver1 := semver.from('1.2.4') or {
        println('Invalid version')
        return
    }
    ver2 := semver.from('2.3.4') or {
        println('Invalid version')
        return
    }

    println(ver1.gt(ver2))
    println(ver2.gt(ver1))
    println(ver1.satisfies('>=1.1.0 <2.0.0'))
    println(ver2.satisfies('>=1.1.0 <2.0.0'))
    println(ver2.satisfies('>=1.1.0 <2.0.0 || >2.2.0'))
}
false
true
true
false
true

For more details see semver.v file.

You can’t perform that action at this time.