setom
v1.0.0
Published
S-Expression to Markup
Downloads
4
Readme
setom
S-Expression to Markup
Usage
Basic
import { toHTML } from setom;
toHTML('(a)');
<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>