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

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

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

Do a comparison of two semantic version objects based on the given operator

Parameters

s0: SemVer

The left side of the comparison

operator: Operator

The operator to use for the comparison

s1: SemVer

The right side of the comparison

Returns

boolean

True or false based on the operator

Parameters

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

Returns

boolean