Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
class EmVer
import { EmVer } from "https://deno.land/x/embassyd_sdk@v0.3.3.0.4/emver-lite/mod.ts";

EmVer is a set of versioning of any pattern like 1 or 1.2 or 1.2.3 or 1.2.3.4 or ..

Constructors

new
private
EmVer(values: number[])

Methods

compare(other: EmVer)

Return a enum string that describes (used for switching/iffs) to know comparison

Used when sorting emver's in a list using the sort method

equals(other: EmVer): boolean
greaterThan(other: EmVer): boolean
greaterThanOrEqual(other: EmVer): boolean
lessThan(other: EmVer): boolean
lessThanOrEqual(other: EmVer): boolean

Used when we need a new emver that has the last number incremented, used in the 1.* like things

Static Methods

from(range: string | EmVer): EmVer

Convert the range, should be 1.2.* or * into a emver Or an already made emver IsUnsafe

parse(range: string): EmVer

Convert the range, should be 1.2.* or * into a emver IsUnsafe