Skip to main content
Module

std/semver/mod.ts>cmp

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
function cmp
Re-export
Deprecated
Deprecated

(will be removed in 0.212.0) Use compare instead.

import { cmp } from "https://deno.land/std@0.211.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