// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
import type { SemVer } from "./types.ts";
import { compare } from "./compare.ts";

/**
 * Not equal comparison
 *
 * This is equal to `compare(s0, s1) !== 0`.
 *
 * @example Usage
 * ```ts
 * import { parse, notEquals } from "@std/semver";
 * import { assert, assertFalse } from "@std/assert";
 *
 * const s0 = parse("1.2.3");
 * const s1 = parse("1.2.4");
 * assert(notEquals(s0, s1));
 * assertFalse(notEquals(s0, s0));
 * ```
 *
 * @param s0 The first version to compare
 * @param s1 The second version to compare
 * @returns `true` if `s0` is not equal to `s1`, `false` otherwise
 */
export function notEquals(s0: SemVer, s1: SemVer): boolean {
  return compare(s0, s1) !== 0;
}

// denoCacheMetadata={"headers":{"date":"Tue, 28 Jul 2026 12:31:15 GMT","x-jsr-backend":"modules","server":"cloudflare","content-security-policy":"default-src 'none'; script-src 'none'; style-src 'none'; img-src 'none'; font-src 'none'; connect-src 'none'; frame-src 'none'; object-src 'none'; frame-ancestors 'none'; sandbox; form-action 'none';","vary":"Origin","report-to":"{\"group\":\"cf-nel\",\"max_age\":604800,\"endpoints\":[{\"url\":\"https://a.nel.cloudflare.com/report/v4?s=hLvgEgY1BveW3dCg5ZaJ7%2B1QeKxLI9pdf27xzoMI%2BZQq9Kb2EOOYyDRbaLPDS5Io7ed9czzTUqffuL7NHq%2BUrWwjMaEV8Gtd%2BpzBTGOc6kt2j8u7ShW0hZQ%3D\"}]}","set-cookie":"__cf_bm=Tc1.mmQxu7_9dGpwI9_5KhlD5HH3dqLqBXQ7eQIo078-1785241875.1727445-1.0.1.1-fq_s_KybG1.KPpl9Bc61.QXzO4dn0NmEe2n6W9pZUhM_WWUEpWwiFtrrUuZdrxka3n1xUkB4hBqaMrwhjVtlP9WNiYK2QhPTXfiSRa7erS_qg3qs4C80.iFunraT2Qpn; HttpOnly; SameSite=None; Secure; Path=/; Domain=jsr.io; Expires=Tue, 28 Jul 2026 13:01:15 GMT","nel":"{\"report_to\":\"cf-nel\",\"success_fraction\":0.0,\"max_age\":604800}","content-type":"text/typescript","access-control-allow-origin":"*","etag":"\"a35783ea0e985a46d6c6d25fdc5e3769\"","cf-ray":"a223e657ca967db6-LAX","accept-ranges":"bytes","access-control-expose-headers":"*","cache-control":"public, max-age=31536000, immutable","x-content-type-options":"nosniff","x-robots-tag":"noindex","alt-svc":"h3=\":443\"; ma=86400","cf-cache-status":"HIT","age":"830909","cross-origin-resource-policy":"cross-origin","content-length":"796"},"url":"https://jsr.io/@std/semver/0.224.3/not_equals.ts","time":1785241875}