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

x/ayonli_jsext/esm/http.js>etag

A JavaScript extension package for building strong and modern applications.
Latest
function etag
import { etag } from "https://deno.land/x/ayonli_jsext@v0.9.72/esm/http.js";

Calculates the ETag for a given entity.

Examples

Example 1

import { stat } from "@ayonli/jsext/fs";
import { etag } from "@ayonli/jsext/http";

const etag1 = await etag("Hello, World!");

const data = new Uint8Array([1, 2, 3, 4, 5]);
const etag2 = await etag(data);

const info = await stat("file.txt");
const etag3 = await etag(info);