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

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

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

Does a deep check on the value to see if it is a valid SemVerComparator object.

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 SemVerComparator

Returns

True if the object is a SemVerComparator otherwise false