Skip to main content
Go to Latest
function stringify
import { stringify } from "https://deno.land/x/etag_middleware@1.0.0-beta.2/deps.ts";

Serialize ETag into string.

Examples

Example 1

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

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