jsbeautify

Online http://jsbeautifier.org/ - node version.

2 个版本
安装
npm install jsbeautify
yarn add jsbeautify
pnpm add jsbeautify
bun add jsbeautify
README

JS Beautifier

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

This is a node implementation of jsbeautifier.

###Install

npm install -g jsbeautify

###Usage

jsbeautify [options] [input file] [output file]

Eg:

jsbeautify minifiy.js ../lib/main.js 

###Options

indent_size - Indentation size,
indent_char: Character to indent with,
preserve_newlines: Whether existing line breaks should be preserved,
preserve_max_newlines: Maximum number of line breaks to be preserved in one chunk,
jslint_happy: If true, then jslint-stricter mode is enforced,
brace_style: "collapse" | "expand" | "end-expand" | "expand-strict" - put braces on the same line as control statements (default), or put braces on own line (Allman / ANSI style), or just put end braces on own line.,
space_before_conditional: Should the space before conditional statement be added, "if(true)" vs "if (true)"

jsbeautifier.org jsbeautifier.org github node jsbeautify

版本列表
0.3.6 2013-03-20
0.3.5 2012-05-05