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

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

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

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

Parameters

version: string | SemVer

The version to compare to the range

range: string | SemVerRange

The range of possible versions

optional
hilo: ">" | "<"

The operator for the comparison or both if undefined.

optional
options: { includePrerelease: boolean; }

Returns

boolean

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