Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/oak_sessions/deps.ts>etag.ifMatch

Session middleware for Oak
Go to Latest
function etag.ifMatch
import { etag } from "https://deno.land/x/oak_sessions@v4.0.1/deps.ts";
const { ifMatch } = 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>