x/oak/mod.ts

A middleware framework for handling HTTP with Deno 🐿️ 🦕
Very Popular
Go to Latest
function etag.calculate
import { etag } from "https://dotland-vbqsvsrpfncg.deno-staging.dev/x/oak@v11.1.0/mod.ts?s=etag.calculate";

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[src]

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

optional
options: ETagOptions
[src]

Returns

Promise<string>[src]