automat
String and markup formatter.Features
- String formatting
- DOM node convenience methods convert your formatted markup to DOM nodes and:
<div>...</div>
element; or
Return them in an existing HTMLElement
you provide.
Append/insert them into an existing HTMLElement
you provide.Update history
v1.2.0:- Removed ability to extract a template from a function body comment. Comment was elided on minification making this device unusable.
- Fixed problem with .firstChild() and .firstElement() methods.
Examples
See tests.API documentation
Detailed API docs can be found here.Demo
A demo can be found here.CDN versions
To use in a browser, you have two options:- Incorporate the node module into your own browserified project.
- Use the browserified versions
automat.js
orautomat.min.js
available on the Github Pages CDN.