Skip to main content
Go to Latest
function isComparator
Deprecated
Deprecated

(will be removed in 0.214.0) Use isSemVerRange instead.

import { isComparator } from "https://deno.land/std@0.213.0/semver/is_comparator.ts";

Does a deep check on the value to see if it is a valid Comparator 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 Comparator

Returns

value is Comparator

True if the object is a Comparator otherwise false