Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

FormatOptions

interface FormatOptions {
compact?: boolean | undefined;
escapeless?: boolean | undefined;
hexadecimal?: boolean | undefined;
indent?: IndentOptions | undefined;
json?: boolean | undefined;
newline?: string | undefined;
parentheses?: boolean | undefined;
preserveBlankLines?: boolean | undefined;
quotes?: string | undefined;
renumber?: boolean | undefined;
safeConcatenation?: boolean | undefined;
semicolons?: boolean | undefined;
space?: string | undefined;
}

§Properties

§
compact?: boolean | undefined
[src]

Do not include superfluous whitespace characters and line terminators. Default is false.

§
escapeless?: boolean | undefined
[src]

Escape as few characters in string literals as necessary. Default is false.

§
hexadecimal?: boolean | undefined
[src]

Generate hexadecimal a numeric literal if it is shorter than its equivalents. Requires option.format.renumber. Default is false.

§
indent?: IndentOptions | undefined
[src]

The indent options

§
json?: boolean | undefined
[src]

Enforce JSON format of numeric and string literals. This option takes precedence over option.format.hexadecimal and option.format.quotes. Default is false.

§
newline?: string | undefined
[src]

New line string. Default is '\n'.

§
parentheses?: boolean | undefined
[src]

Preserve parentheses in new expressions that have no arguments. Default is true.

§
preserveBlankLines?: boolean | undefined
[src]
§
quotes?: string | undefined
[src]

Delimiter to use for string literals. Accepted values are: 'single', 'double', and 'auto'. When 'auto' is specified, escodegen selects a delimiter that results in a shorter literal. Default is 'single'.

§
renumber?: boolean | undefined
[src]

Try to generate shorter numeric literals than toString() (9.8.1). Default is false.

§
safeConcatenation?: boolean | undefined
[src]
§
semicolons?: boolean | undefined
[src]

Preserve semicolons at the end of blocks and programs. Default is true.

§
space?: string | undefined
[src]

White space string. Default is standard ' ' (\x20).