Skip to main content
Module

std/semver/mod.ts>cmp

Deno standard library
Go to Latest
function cmp
Re-export
import { cmp } from "https://deno.land/std@0.192.0/semver/mod.ts";

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