Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/hex/src/lib/mod.ts>stdx.semver.compare

An ecosystem delivering practices, philosophy and portability. Powered By Deno and JavaScript.
Latest
function stdx.semver.compare
import { stdx } from "https://deno.land/x/hex@0.6.5/src/lib/mod.ts";
const { compare } = stdx.semver;

Returns 0 if v1 == v2, or 1 if v1 is greater, or -1 if v2 is greater. Sorts in ascending order if passed to Array.sort(),

Parameters

v1: string | SemVer
v2: string | SemVer
optional
options: Options

Returns

1 | 0 | -1