Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
class Checker
import { Checker } from "https://deno.land/x/embassyd_sdk@v0.3.4.0.0-alpha2/lib/esm/emver-lite/mod.js";

A checker is a function that takes a version and returns true if the version matches the checker. Used when we are doing range checking, like saying ">=1.0.0".check("1.2.3") will be true

Constructors

new
Checker(check)

Methods

and(...others)

Used when we want the and condition with another checker

not()

A useful example is making sure we don't match an exact version, like !=1.2.3

or(...others)

Used when we want the or condition with another checker

Static Methods

parse(range)

Will take in a range, like >1.2 or <1.2.3.4 or =1.2 or 1.* and return a checker, that has the check function for checking that a version is in the valid