import { ifMatch } from "https://deno.land/x/ayonli_jsext@v0.9.72/workerd/http.ts";
Checks if the value from the If-Match
header matches the given ETag.
NOTE: Weak tags cannot be matched and will return false
.
Examples
Example 1
Example 1
import { etag, ifMatch } from "@ayonli/jsext/http";
const _etag = await etag("Hello, World!");
const match = ifMatch("d-3/1gIbsr1bCvZ2KQgJ7DpTGR3YH", _etag);
console.log(match); // true