Module

std/semver/mod.ts>cmp

Deno standard library
Go to Latest
function cmp
import { cmp } from "https://dotland.deno.dev/std@0.181.0/semver/mod.ts";

Pass in a comparison string, and it'll call the corresponding comparison function. "===" and "!==" do simple string comparison, but are included for completeness. Throws if an invalid comparison string is provided.

Parameters

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

Returns

boolean