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

x/fresh/src/dev/deps.ts>semver.compareBuild

The next-gen web framework.
Extremely Popular
Go to Latest
function semver.compareBuild
import { semver } from "https://deno.land/x/fresh@1.5.4/src/dev/deps.ts";
const { compareBuild } = semver;

Compare two semantic version objects including build metadata.

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(),

Returns

1 | 0 | -1

Parameters

s0: string | SemVer
s1: string | SemVer
optional
options: { includePrerelease: boolean; }

Returns

1 | 0 | -1