mirror of
https://github.com/denoland/std.git
synced 2024-11-21 20:50:22 +00:00
0a32c8f5e8
Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com> Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
13 lines
427 B
TypeScript
13 lines
427 B
TypeScript
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
import { compare } from "./compare.ts";
|
|
import type { SemVer } from "./types.ts";
|
|
|
|
/**
|
|
* Returns `true` if both semantic versions are logically equivalent, even if they're not the exact same version object.
|
|
*
|
|
* This is equal to `compare(s0, s1) === 0`.
|
|
*/
|
|
export function equals(s0: SemVer, s1: SemVer): boolean {
|
|
return compare(s0, s1) === 0;
|
|
}
|