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
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);