Scroll to navigation

JS-BEAUTIFY(1) User Commands JS-BEAUTIFY(1)

NAME

js-beautify - beautify, unpack or deobfuscate JavaScript

DESCRIPTION

js-beautify.js@1.14.6

CLI Options:

Input file(s) (Pass '-' for stdin)
Write output in-place, replacing input
Write output to file (default stdout)
Path to config file
[js|css|html] ["js"]
Suppress logging to stdout
Show this help
Show the version

Beautifier Options:

Indentation size [4]
Indentation character [" "]
Indent with tabs, overrides -s and -c
Character(s) to use as line terminators. [first newline in file, otherwise "\n]
End output with newline
Keep indentation on empty lines
List of templating languages (auto,none,django,erb,handlebars,php,smarty) ["auto"] auto = none in JavaScript, all in html
Use EditorConfig to set up the options
Initial indentation level [0]
Preserve line-breaks (--no-preserve-newlines disables)
Number of line-breaks to be preserved in one chunk [10]
Add padding spaces within paren, ie. f( a, b )
Add a single space inside empty paren, ie. f( )
Enable jslint-stricter mode
Add a space before an anonymous function's parens, ie. function ()
Add a space before a named function's parens, ie. function example ()
[collapse|expand|end-expand|none][,preserve-inline] [collapse,preserve-inline]
Don't indent chained method calls
Break chained method calls across subsequent lines
Preserve array indentation
Decode printable characters encoded in xNN notation
Wrap lines that exceed N characters [0]
Pass E4X xml literals through untouched
Warm the cockles of Crockford's heart
Put commas at the beginning of new line instead of end
Set operator position (before-newline|after-newline|preserve-newline) [before-newline]
August 2022 js-beautify 1.14.6