Skip to main content
Module

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

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

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.