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

std/semver/mod.ts>isSemVerRange

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

Does a deep check on the object to determine if its a valid range.

Objects with extra fields are still considered valid if they have at least the correct fields.

Adds a type assertion if true.

Parameters

value: unknown

The value to check if its a valid SemVerRange

Returns

value is SemVerRange

True if its a valid SemVerRange otherwise false.