mirror of
https://github.com/denoland/std.git
synced 2024-11-21 20:50:22 +00:00
aa3f026e93
* initial commit * Update semver/is_range.ts Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com> * bump deprecation notice * add test cases * fmt * Update types.ts Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com> * Update types.ts Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com> * Update is_semver_range.ts Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com> --------- Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com> Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
13 lines
369 B
TypeScript
13 lines
369 B
TypeScript
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
import type { Range, SemVer, SemVerRange } from "./types.ts";
|
|
import { lt } from "./lt.ts";
|
|
import { rangeMin } from "./range_min.ts";
|
|
|
|
/** Less than range comparison */
|
|
export function ltr(
|
|
version: SemVer,
|
|
range: SemVerRange | Range,
|
|
): boolean {
|
|
return lt(version, rangeMin(range));
|
|
}
|