import { compareWeak } from "https://deno.land/x/etag_parser@1.1.0/validate.ts";
Weak comparison. Two ETag are equivalent if ETag.tag match character-by-character, regardless of either or both being tagged as ETag.weak. Compliant with RFC 9110, 8.8.3.2. Comparison.
Examples
Example 1
Example 1
import { compareWeak } from "https://deno.land/x/etag_parser@$VERSION/validate.ts";
import { assert } from "https://deno.land/std/testing/asserts.ts";
assert(
compareWeak(
{ weak: true, tag: "123456789" },
{ weak: false, tag: "123456789" },
),
);