Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
class semver.Comparator
import { semver } from "https://deno.land/std@0.157.0/_tools/release/deps.ts";
const { Comparator } = semver;

Constructors

new
Comparator(comp: string | Comparator, optionsOrLoose?: boolean | Options)

Properties

loose: boolean
operator:
| ""
| "="
| "<"
| ">"
| "<="
| ">="
options: Options
semver: SemVer
value: string

Methods

intersects(comp: Comparator, optionsOrLoose?: boolean | Options): boolean
parse(comp: string): void
test(version: string | SemVer): boolean
toString(): string