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

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

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

Returns the highest version in the list that satisfies the range, or undefined if none of them do.

Parameters

versions: SemVer[]

The versions to check.

The range of possible versions to compare to.

Returns

SemVer | undefined

The highest version in versions that satisfies the range.

Type Parameters

T extends string | SemVer

Parameters

versions: readonly T[]
range: string | SemVerRange
optional
options: { includePrerelease: boolean; }

Returns

T | undefined