UNPKG

rjweb-server

Version:

Easy and Robust Way to create a Web Server with Many Easy-to-use Features in NodeJS

7 lines (6 loc) 362 B
import { Content } from "../types/global"; import Cookie from "../classes/Cookie"; /** * Generate a Hash from a Body, Headers & Status Code to be used for caching using SHA1 * @since 6.0.0 */ export default function toETag(data: ArrayBuffer, headers: Record<string, Content>, cookies: Record<string, Cookie>, status: number): `W/"${string}-${string}"` | null;