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

x/superdeno/test/deps.ts>Oak.etag.calculate

Super-agent driven library for testing Deno HTTP servers.
Go to Latest
function Oak.etag.calculate
import { Oak } from "https://deno.land/x/superdeno@4.8.0/test/deps.ts";
const { calculate } = Oak.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>