Victorica
a simple html beautifier
Installation
Via npm
$ npm install victorica --save
var victorica= ;console; //function
Via bower
$ bower install victorica --save
Via rawgit.com(the simple way)
API
victorica(html,options) -> beautified
Adjust the indentation using options.space
(default ).
index.htmlfoo bar baz Lorem ipsum dolor sit amet. dont touch this. <!--this is comment -->
victorica
of default:
index.html foo bar baz Lorem ipsum dolor sit amet. dont touch this. <!--this is comment -->
usage:
// Dependenciesvar victorica= ;var fs= ;var html= fs; // Defaultsvar options= // indentation character space: ' ' // doesn't handle the innerHTML of matching elements ignore: 'script''style''title''a''abbr''acronym''b''bdo''big''button''cite''code''dfn''em''i''img''kbd''label''map''object''pre''q''samp''small''span''strong''sub''sup''textarea''tt''var' // if true, remove self closing char (e.g <img /> -> <img>) removeSelfClose: true; console;