Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/fresh/src/dev/deps.ts>semver.rcompare

The next-gen web framework.
Extremely Popular
Go to Latest
function semver.rcompare
import { semver } from "https://deno.land/x/fresh@1.4.3/src/dev/deps.ts";
const { rcompare } = semver;

A reverse comparison of two versions. Same as compare but 1 and -1 are inverted.

Sorts in descending order if passed to Array.sort(),

Returns

1 | 0 | -1

Parameters

s0: string | SemVer
s1: string | SemVer

Returns

1 | 0 | -1