Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

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

An ecosystem delivering practices, philosophy and portability. Powered By Deno and JavaScript.
Latest
function oak.etag.calculate
import { oak } from "https://deno.land/x/hex@0.6.5/src/fw/service/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>