Skip to main content
Module

std/semver/rcompare.ts>rcompare

Deno standard library
Go to Latest
function rcompare
Deprecated
Deprecated

(will be removed in 0.212.0) Use compare instead.

import { rcompare } from "https://deno.land/std@0.211.0/semver/rcompare.ts";

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