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.
The value to check if its a valid Range
True if its a valid Range otherwise false.
import { isRange } from "@std/semver/is-range";import { assert } from "@std/assert";const range = [[{ major: 1, minor: 2, patch: 3 }]];assert(isRange(range));assert(!isRange({})); Copy
import { isRange } from "@std/semver/is-range";import { assert } from "@std/assert";const range = [[{ major: 1, minor: 2, patch: 3 }]];assert(isRange(range));assert(!isRange({}));
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.