setom
v2.0.1
Published
S-Expression to Markup
Readme
setom
S-Expression to Markup
Requires Node.js 22 or later. The package supports both native ESM and CommonJS.
Usage
Native ESM
import { toHTML } from 'setom';
toHTML('(a)');CommonJS
const { toHTML } = require('setom');
toHTML('(a)');Basic
<a></a>Nested
toHTML('(div (a))');<div><a></a></div>Nested with Multiple Children
toHTML('(div (a) (a))');<div><a></a><a></a></div>Text Content
toHTML('(p a)');<p>a</p>or
toHTML('(p "banana")');<p>banana</p>or
toHTML('(p "ban" "ana")');<p>banana</p>Attributes
toHTML('(a :href "github.com")');<a href="github.com"></a>Boolean Attributes
toHTML('(input id:"5" :readonly :checked :type "checkbox")');<input id="5" readonly checked type="checkbox"></input>