Skip to main content

@thai/html@0.0.5
Built and signed on GitHub Actions

Safely generate HTML strings

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
100%
Published
3 months ago (0.0.5)
function html
html(
strings: TemplateStringsArray,
...values: any[],
): Hypertext

Use the html template tag to safely generate HTML. It returns a Hypertext object. You can use the toHtml method to get the HTML code. Interpolated values are escaped unless they are

Parameters

strings: TemplateStringsArray
...values: any[]

Return Type

Add Package

deno add @thai/html

Import symbol

import { html } from "@thai/html";

Add Package

npx jsr add @thai/html

Import symbol

import { html } from "@thai/html";

Add Package

yarn dlx jsr add @thai/html

Import symbol

import { html } from "@thai/html";

Add Package

pnpm dlx jsr add @thai/html

Import symbol

import { html } from "@thai/html";

Add Package

bunx jsr add @thai/html

Import symbol

import { html } from "@thai/html";