Skip to content Search Apps Documentation Source Content File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

semver — Semantic Versioning on-chain

Demo of the p/moul/x/daily/semver library — a port of golang.org/x/mod/semver. Parse vMAJOR.MINOR.PATCH[-prerelease][+build] and compare with SemVer 2.0.0 precedence.

Examples

a rel b note
1.2.3 < 1.2.10 numeric patch, not lexical
1.0.0-alpha < 1.0.0 pre-release < release
1.0.0-alpha.1 < 1.0.0-alpha.beta numeric id < alphanumeric id
1.0.0-rc.1 < 1.0.0 release candidate < final
2.0.0 = 2.0.0+build.5 build metadata ignored

Try it