Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/hex/src/fw/service/deps.ts>oak.etag.ifMatch

An ecosystem delivering practices, philosophy and portability. Powered By Deno and JavaScript.
Go to Latest
function oak.etag.ifMatch
import { oak } from "https://deno.land/x/hex@0.6.3/src/fw/service/deps.ts";
const { ifMatch } = oak.etag;

A helper function that takes the value from the If-Match header and an entity and returns true if the ETag for the entity matches the supplied value, otherwise false.

See MDN's If-Match article for more information on how to use this function.

Parameters

value: string
entity: string | Uint8Array | FileInfo
optional
options: ETagOptions = [UNSUPPORTED]

Returns

Promise<boolean>