JS-BEAUTIFY(1)
π JS-BEAUTIFY(1) π
okay bestie, sit down, we're learning js-beautify β it's the manual page, it's in the User Commands section, and it's about to fix your crusty unreadable JavaScript. no cap.
β¨ NAME β¨
js-beautify β beautify, unpack or deobfuscate JavaScript π¦
β¨ SYNOPSIS β¨
jsbeautifier.py [options] <infile>
β¨ DESCRIPTION β¨
jsbeautifier.py@1.15.1
Javascript beautifier (<https://beautifier.io/>) β literally the glow-up your code has been begging for π
quick note bestie: <infile> can be "-", which means stdin. yes, the dash. iconic behaviour honestly.
β¨ OPTIONS β¨
πΈ Input options
-i,--stdinβ Read input from stdin
π Output options
-s,--indent-size=NUMBERβ Indentation size. (default 4).-c,--indent-char=CHARβ Character to indent with. (default space).-e,--eol=STRINGβ Character(s) to use as line terminators. (default first newline in file, otherwise"\n")-t,--indent-with-tabsβ Indent with tabs, overrides-sand-c-d,--disable-preserve-newlinesβ Do not preserve existing line breaks.-P,--space-in-parenβ Add padding spaces within paren, ie.f( a, b )-E,--space-in-empty-parenβ Add a single space inside empty paren, ie.f( )-j,--jslint-happyβ More jslint-compatible output-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, i.e.function example ()-b,--brace-style=collapseβ Brace style (collapse,expand,end-expand,none)(,preserve-inline)-k,--keep-array-indentationβ Keep array indentation.--quietβ Suppress info about a file if nothing was changed.-r,--replaceβ Write output in-place, replacing input-o,--outfile=FILEβ Specify a file to output to (default stdout)-f,--keep-function-indentationβ Do not re-indent function bodies defined in var lines.-x,--unescape-stringsβ Decode printable chars encoded in\xNNnotation.-X,--e4xβ Pass E4X xml literals through untouched-C,--comma-firstβ Put commas at the beginning of new line instead of end.-m,--max-preserve-newlines=NUMBERβ Number of line-breaks to be preserved in one chunk (default 10)-O,--operator-position=STRINGβ Set operator position (before-newline,after-newline,preserve-newline)-w,--wrap-line-lengthβ Attempt to wrap line when it exceeds this length. NOTE: Line continues until next wrap point is found.-n,--end-with-newlineβ End output with newline--indent-empty-linesβ Keep indentation on empty lines--templatingβ List of templating languages (auto,none,django,erb,handlebars,php,smarty,angular)["auto"]βauto= none in JavaScript, all in html--editorconfigβ Enable setting configuration from EditorConfig
π Rarely needed options
ngl these ones are giving "only if you know why you're here" energy π
--eval-codeβ evaluate code if a JS interpreter is installed. May be useful with some obfuscated script but poses a potential security issue.
β οΈ bestie, read that again: potential security issue. this one actually runs the code. be so careful. π¨
-l,--indent-level=NUMBERβ Initial indentation level. (default 0).-h,--help,--usageβ Prints this help statement.-v,--versionβ Show the version
and that's the whole page, periodt π your code is gonna look so good it'll have main character energy β¨
okay so the official β¨receiptsβ¨ on this one: it's <strong>js-beautify 1.15.1</strong>, dated <strong>March 2024</strong>, and yeah β that's the version, that's the date, that's the whole vibe. go forth and beautify, bestie π«Άπ
π¦ where this page comes from
- debian trixie: jsbeautifier 1.15.3-1 Β· MIT
- ubuntu resolute: jsbeautifier 1.15.3-1 Β· MIT
- ubuntu stonking: jsbeautifier 2.0.3-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms