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

x/oak_sessions/deps.ts>etag.calculate

Session middleware for Oak
Go to Latest
function etag.calculate
import { etag } from "https://deno.land/x/oak_sessions@v4.0.2/deps.ts";
const { calculate } = etag;

Calculate an ETag value for an entity. If the entity is FileInfo, then the tag will default to a weak ETag. options.weak overrides any default behavior in generating the tag.

Parameters

entity: string | Uint8Array | FileInfo

A string, Uint8Array, or file info to use to generate the ETag

optional
options: ETagOptions = [UNSUPPORTED]

Returns

Promise<string>