Skip to main content
Module

std/semver/mod.ts>cmp

Deno standard library
Go to Latest
function cmp
import { cmp } from "https://deno.land/std@0.177.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