Beautifier for javascript
Go to file
Einar Lielmanis 93e37a2a70 Improve trailing comment handling
Based on the comment handler of Deathamn's opera extension
2011-05-12 02:29:50 +03:00
attic It's official: python/jsbeautifier.py 2011-03-27 23:32:08 +03:00
jquery Use the space in a more meaningful way. 2011-05-02 16:16:34 +03:00
python Fix var x = function indentation bug 2011-04-20 13:55:47 +03:00
tests Fix var x = function indentation bug 2011-04-20 13:55:47 +03:00
unpackers bookmarklet_unpacker -> urlencode_unpacker 2011-04-26 11:57:14 +03:00
beautify-html.js style_html obeys brace_style 2011-03-23 22:31:30 +02:00
beautify.js Fix var x = function indentation bug 2011-04-20 13:55:47 +03:00
index.html Improve trailing comment handling 2011-05-12 02:29:50 +03:00
license.txt It's official: python/jsbeautifier.py 2011-03-27 23:32:08 +03:00
readme.txt It's official: python/jsbeautifier.py 2011-03-27 23:32:08 +03:00

 JS Beautifier
---------------

  ...or, more specifically, all of the code powering jsbeautifier.org.

  This little beautifier will reformat and reindent bookmarklets, ugly
  javascript, unpack scripts packed by the popular Dean Edward's packer,
  as well as deobfuscate scripts processed by javascriptobfuscator.com.

  To beautify from the command-line you can use provided jsbeautifer.py
  script/library. Run it to see its usage information; e.g
  "./jsbeautifier.py file.js" beautifies a file, output goes to stdout.

  To use jsbeautifier.py as a library is simple:

    import jsbeautifier
    res = jsbeautifier.beautify('your javascript string')
    res = jsbeautifier.beautify_file('some_file.js')

  or, to specify some options,

    opts = jsbeautifier.default_options()
    opts.indent_size = 2
    res = jsbeautifier.beautify('some javascript', opts)

  Note that only the html+js version supports unpacking various packers.

  You are free to use this in any way you want, in case you find this
  useful or working for you.

  Written by Einar Lielmanis, <einar@jsbeautifier.org>

  Thanks to Jason Diamond, Patrick Hof, Nochum Sossonko, Andreas Schneider, Dave
  Vasilevsky, Vital Batmanov, Ron Baldwin, Gabriel Harrison, Chris J. Hull and
  others.