Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

std/semver/mod.ts>SemVer

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
class SemVer
import { SemVer } from "https://deno.land/std@0.167.0/semver/mod.ts";

Constructors

new
SemVer(version: string | SemVer, options?: Options)

Properties

build: ReadonlyArray<string>
major: number
minor: number
options: Options
patch: number
prerelease: Array<string | number>
raw: string
version: string

Methods

compare(other: string | SemVer): 1 | 0 | -1
compareBuild(other: string | SemVer): 1 | 0 | -1
compareMain(other: string | SemVer): 1 | 0 | -1
comparePre(other: string | SemVer): 1 | 0 | -1
format(): string
increment(release: ReleaseType, identifier?: string): SemVer
toString(): string