Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@hedia/html
Advanced tools
$ npm install @hedia/html -E
import { attr, comment, document, render } from "@hedia/html";
import { a, body, h1, head, html, img, meta, p, title } from "@hedia/html/elements";
import { content, name, style } from "@hedia/html/attributes";
render(
document(
html(
lang("en"),
comment("head --"),
head(
title("HTML | Hedia"),
meta(
name("description"),
content("Hedia HTML Renderer."),
),
meta(
name("keywords"),
content("hedia,html,rendering."),
),
),
body(
h1("HTML", isItMonday() && p("It is monday")),
p(style("font-weight: bold"), "Hedia HTML Renderer."),
img(
src(
"https://www.hedia.co/wp-content/uploads/2017/03/hedia_blue.png",
),
),
a(href("https://hedia.co/"), "Hedia"),
),
),
),
);
Outputs:
<!DOCTYPE html>
<html lang="en">
<head>
<!--head-->
<title>HTML | Hedia</title>
<meta name="description" content="Hedia HTML Renderer.">
<meta name="keywords" content="hedia,html,rendering.">
</head>
<body>
<h1>HTML</h1>
<p style="font-weight: bold">Hedia HTML Renderer.</p>
<img src="https://www.hedia.co/wp-content/uploads/2017/03/hedia_blue.png">
<a href="https://hedia.co/">Hedia</a>
</body>
</html>
Renders the Document
, Element
or Text
node to a Buffer
with UTF-8 encoding.
import { attr, document, renderToBuffer } from "@hedia/html";
import { body, head, html, } from "@hedia/html/elements";
const buffer = renderToBuffer(
document(
html(
head(),
body(),
),
),
);
Renders the Document
, Element
or Text
node to a Readable
64kb at a time.
import { document, renderToReadable } from "@hedia/html";
import { body, head, html, } from "@hedia/html/elements";
const readable = renderToReadable(
document(
html(
head(),
body(),
),
),
);
process.stdout.pipe(readable);
$ npm run build
$ npm test
FAQs
HTML
The npm package @hedia/html receives a total of 0 weekly downloads. As such, @hedia/html popularity was classified as not popular.
We found that @hedia/html demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 9 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.