Skip to main content
Latest
function semver.cmp
import { semver } from "https://deno.land/x/etag@0.2.0/deps.ts";
const { cmp } = semver;

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