
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
preact-html
Advanced tools
Turn HTML strings into Preact VNodes. The functional version of preact-markup.
This satisifies my use case of being able to modify vnodes before render. If you'd like to replace class names on the markup, you may want to try this library, otherwise I'd probably go with the better tested preact-markup.
const { CSS, HTML, render } = require('vcom')
const html = require('preact-html')
const css = CSS(`
.blue {
background: blue;
}
`)
const vnodes = html('<h2 class="blue"><strong>hi there!</strong></h2>', {
h2 (props) {
return HTML.h3.class(props.class)(props.children)
}
})
const div = css(HTML.div(vnodes))
render(div, document.body)
// <div><h3 class="_1nxhvta"><strong>hi there!</strong></h3></div>
@developit wrote 99% of this.
MIT
FAQs
Turn HTML strings into Preact VNodes
We found that preact-html demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.