Files
Bendik Aagaard LynghaugandClaude Fable 5 90cca611c9 feat(html): add @choojs/html — server renderer, raw(), morph
ESM ports with attribution: nanohtml 1.10.0 server tag (browserify/babel
transform branches removed — pure runtime), raw-server, and nanomorph 5.4.3
consolidated into one module. browser.js is a Phase 2 placeholder that
throws loudly. Covered by test/server.test.js on node:test.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014NgfSjHE11oFpoSnLVKLXd
2026-09-08 15:59:26 +02:00

12 lines
299 B
JavaScript

// Ported from nanohtml 1.10.0 lib/raw-server.js (MIT)
// Mark a string as pre-encoded so the html tag won't escape it.
export default function raw (tag) {
// eslint-disable-next-line no-new-wrappers
const wrapper = new String(tag)
wrapper.__encoded = true
return wrapper
}
export { raw }