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

equals.ts
View Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.// This module is browser compatible.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;}
std

Version Info

Tagged at
6 months ago