Skip to main content
Latest
function stringifyETag
import { stringifyETag } from "https://deno.land/x/etag_middleware@1.1.0/deps.ts";

Serialize ETag into string.

Examples

Example 1

import { stringifyETag } from "https://deno.land/x/etag_parser@$VERSION/stringify.ts";
import { assertEquals } from "https://deno.land/std/testing/asserts.ts";

assertEquals(stringifyETag({ weak: true, tag: "123456789" }), `W/"123456789"`);
assertEquals(stringifyETag({ weak: false, tag: "123456789" }), `"123456789"`);