deno.land / std@0.224.0 / semver / satisfies.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
import type { Range, SemVer } from "./types.ts";import { testComparatorSet } from "./_test_comparator_set.ts";
/** * Test to see if the version satisfies the range. * @param version The version to test * @param range The range to check * @returns true if the version is in the range */export function satisfies( version: SemVer, range: Range,): boolean { return range.some((set) => testComparatorSet(version, set));}
std

Version Info

Tagged at
3 weeks ago