Skip to main content
import * as etag from "https://deno.land/x/etag@0.0.1/mod.ts";

Functions

Decode an etag into the relevant file info.

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.

Create middleware that will attempt to decode the response.body into something that can be used to generate an ETag and add the ETag header to the response.

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.

A helper function that takes the value from the If-No-Match header and an entity and returns false if the ETag for the entity matches the supplied value, otherwise false.

A helper function that takes the value from the If-No-Match header and an entity and returns false if the ETag for the entity matches the supplied value, otherwise false.

Interfaces

Properties unique to the decoded statTag interface. StatTags are generated for objects that exhibit characteristics of the Deno.FileInfo interface, specifically objects that have properties named mtime, size,

Type Aliases

Partial implementation of the Deno.FileInfo interface. Describes a file, and is returned by stat, lstat, statSync, lstatSync.