JS-BEAUTIFY(1)

πŸ“¦
version 1.15.4 Β· 3 versions
, in debian trixie, ubuntu resolute

πŸ¦‹ js-beautify β€” the manual page, bestie edition πŸ’…

okay so. you found the manual for js-beautify, which lives in the User Commands section of the manual (section 1, iykyk). no cap, this thing is a whole vibe.


✨ NAME ✨

js-beautify β€” beautify, unpack or deobfuscate JavaScript πŸŽ€

like. it takes your cursed little minified soup and makes it pretty again. that's the whole gig. main character energy fr.


🌸 DESCRIPTION 🌸

we're running js-beautify.js@1.15.4 bestie. write that down.

πŸ‘‘ CLI Options:

these are the knobs you turn from the command line. the actual driver's seat stuff.

  • -f, --file β€” the input file(s) you wanna feed it. pass - and it'll read from stdin instead, iconic.
  • -r, --replace β€” writes the output in-place, so it straight up replaces your input file. yes, really. 🫢
  • -o, --outfile β€” write the output to a file instead. default is stdout, as it should be.
  • --config β€” path to a config file, so you can stop typing the same flags over and over like a legend.
  • --type [js|css|html] ["js"] β€” tells it what flavour of file it's dealing with. default is "js".
  • -q, --quiet β€” suppress logging to stdout. shhh. 🀫
  • -h, --help β€” show this help. (hi, that's me, that's this page.)
  • -v, --version β€” show the version. we love a version check.

🧚 Beautifier Options:

now THIS is the fun part. this is where you sculpt. ✨

  • -s, --indent-size β€” indentation size. default is 4.
  • -c, --indent-char β€” the indentation character. default is " " (a space, bestie).
  • -t, --indent-with-tabs β€” indent with tabs instead. heads up: this overrides -s and -c. team tabs wins, sorry team spaces. πŸ’€
  • -e, --eol β€” the character(s) to use as line terminators. default is first newline in file, otherwise "\n. it literally sniffs your file first, obsessed.
  • -n, --end-with-newline β€” end the output with a newline. that's it. that's the flag.
  • --indent-empty-lines β€” keeps the indentation on empty lines. yes, even the blank ones get dressed up. πŸŽ€
  • --templating β€” list of templating languages: (auto,none,angular,django,erb,handlebars,php,smarty). default is "auto". and fr fr, here's what auto means: auto = none in JavaScript, and auto = all except angular in html (and inline javascript/css). lowkey genius.
  • --editorconfig β€” use EditorConfig to set up the options. let the config file do the talking.
  • -l, --indent-level β€” initial indentation level. default is 0.
  • -p, --preserve-newlines β€” preserve line-breaks. and if you want the opposite, --no-preserve-newlines disables it. πŸ™ˆ
  • -m, --max-preserve-newlines β€” number of line-breaks to be preserved in one chunk. default is 10.
  • -P, --space-in-paren β€” add padding spaces within paren, ie. f( a, b ). look at the lil breathing room. 😌
  • -E, --space-in-empty-paren β€” add a single space inside empty paren, ie. f( ).
  • -j, --jslint-happy β€” enable jslint-stricter mode. strict era.
  • -a, --space-after-anon-function β€” add a space before an anonymous function's parens, ie. function ().
  • --space_after_named_function β€” add a space before a named function's parens, ie. function example (). note the underscores, she's built different from -a.
  • -b, --brace-style β€” [collapse|expand|end-expand|none][,preserve-inline]. default is [collapse,preserve-inline]. yes, it takes two parts. yes, the comma matters.
  • -u, --unindent-chained-methods β€” don't indent chained method calls. let them hang out at the same level.
  • -B, --break-chained-methods β€” break chained method calls across subsequent lines. one per line, we're being dramatic about it. πŸ’…
  • -k, --keep-array-indentation β€” preserve array indentation. your hand-aligned arrays stay hand-aligned.
  • -x, --unescape-strings β€” decode printable characters encoded in xNN notation.
  • -w, --wrap-line-length β€” wrap lines that exceed N characters. default is 0.
  • -X, --e4x β€” pass E4X xml literals through untouched. no notes, no changes.
  • --good-stuff β€” warm the cockles of Crockford's heart. 🫢 that is the entire documented description. I don't make the rules.
  • -C, --comma-first β€” put commas at the beginning of a new line instead of at the end. controversial. iconic. ate.
  • -O, --operator-position β€” set operator position (before-newline|after-newline|preserve-newline). default is before-newline.

ngl the whole point of this page is: it beautifies, unpacks, or deobfuscates JavaScript. everything above is just how you choose to make it look. periodt. πŸ‘‘

and that's the whole manual, bestie!! πŸ’– this was js-beautify version 1.15.4, documented back in March 2025, and it lives under the title JS-BEAUTIFY(1) in the User Commands section. go make something pretty with it. mwah. πŸŽ€πŸ¦‹βœ¨

πŸ“¦ where this page comes from