Back

Version 6

3/7/2024
import { ribbonElement } from "https://esm.town/v/andreterron/codeOnVT_ribbonElement?v=7";
import { extractValInfo } from "https://esm.town/v/pomdtr/extractValInfo?v=26";
import { appendFragment } from "https://esm.town/v/vladimyr/appendFragment";

const { author, name } = extractValInfo(import.meta.url);

const html = `<html>
<head>
<title>test</title>
</head>
<body>
<p><code>@vladimyr/appendFragment</code> test</p>
</body>
</html>
`.trim();

export default async function(req: Request): Promise<Response> {
return new Response(
appendFragment(
ribbonElement({ val: { handle: author, name } }),
html,
),
{ headers: { "content-type": "text/html" } },
);
}