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

std/semver/mod.ts>minSatisfying

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
function minSatisfying
import { minSatisfying } from "https://deno.land/std@0.199.0/semver/mod.ts";

Returns the lowest 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 lowest 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