
Product
Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
@sondr3/radiant
Advanced tools
A simple, type-safe, and functional way to create HTML documents in TypeScript.
Blaze your way through HTML using the type-safety of TypeScript
import { h, renderDocument } from "@sondr3/radiant";
const doc = h.document(
h.doctype(),
h.html(
h.head(
h.meta({ charset: "utf-8" }),
h.title("Hello, world!"),
),
h.body(
h.h1({ class: "blah" }, "Hello, world!"),
),
),
);
console.log(renderDocument(doc));
See more details and documentations at JSR.
pnpm
: pnpm add @sondr3/radiant
npm
: npm add @sondr3/radiant
yarn
: yarn add @sondr3/radiant
deno add @sondr3/radiant
and import it import { h } from "@sondr3/radiant"
import { h } from "jsr"@sondr3/radiant"
bun add @sondr3/radiant
import { h } from "@sondr3/radiant
import { h } from "@sondr3/radiant";
// @ts-expect-error missing href
h.a({ class: "link" }, "Missing href");
// @ts-expect-error invalid nesting
h.p(h.head(h.title("Not valid")));
Also included is a very basic XML renderer with support for building and rendering sitemaps.
import { renderSitemap, s } from "@sondr3/radiant/sitemap";
const sitemap = s.document(
s.doctype(),
s.urlset(
s.url(
s.loc("http://www.example.com/"),
s.lastmod(new Date("2005-01-01")),
s.changefreq("monthly"),
s.priority(0.8),
),
s.url(
s.loc("http://www.example.com/catalog?item=73&desc=vacation_new_zealand"),
s.lastmod(new Date("2004-12-23")),
s.changefreq("weekly"),
),
s.url(
s.loc("http://www.example.com/catalog?item=74&desc=vacation_newfoundland"),
s.lastmod(new Date("2004-12-23T18:00:15Z")),
s.priority(0.3),
),
),
);
console.log(renderSitemap(sitemap, { pretty: true }));
After having used libraries like blaze and lucid in Haskell and smolder in PureScript, I
wanted something similar in TypeScript. This is my attempt at creating a variant of them in it. It's not 100% as
ergonomic in my opinion, but it's pretty close. Hence it's also named somewhat akin to blaze
and smolder
.
MIT.
FAQs
A simple, type-safe, and functional way to create HTML documents in TypeScript.
We found that @sondr3/radiant demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.