1.0.0 • Published 11 years ago
to-ml v1.0.0
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>