to-ml
v1.0.0
Published
very simple, very tiny lib to generate markup without a dom
Readme
SYNOPSIS
Easily generate markup from javascript
USAGE
var to = require('to-ml')()
to.span('hello, world!')Nesting tags
Nested tags are just strings, so put them in any order you want.
to.span('hey!',
to.span('this is',
to.b('easy')
)
)<span>hey!<span>this is<b>easy</b></span></span>Adding attributes
Just add an object to the arguments, doesnt mater what order it's provided in.
to.div('hey!', { id: 'greeting' }
)<div id="greeting">hey!</div>