Skip to main content
Module

std/semver/mod.ts>outside

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
function outside
Deprecated
Deprecated

(will be removed in 0.215.0) Use gtr, ltr or testRange instead.

import { outside } from "https://deno.land/std@0.213.0/semver/mod.ts";

Returns true if the version is outside the bounds of the range in either the high or low direction. The hilo argument must be either the string '>' or '<'. (This is the function called by gtr and ltr.)

Parameters

version: SemVer

The version to compare to the range

The range of possible versions

optional
hilo: ">" | "<"

The operator for the comparison or both if undefined.

Returns

boolean

True if the version is outside of the range based on the operator