Optional auxiliaryOptional auxiliaryOptional string to add as a block comment at the start of the output file.
Optional commentsShould comments be included in output? Defaults to true.
Optional compactSet to true to avoid adding whitespace for formatting. Defaults to the value of opts.minified.
Optional conciseSet to true to reduce whitespace (but not as much as opts.compact). Defaults to false.
Optional decoratorsSet to true to enable support for experimental decorators syntax before module exports.
Defaults to false.
Optional filenameUsed in warning messages
Optional importThe import attributes/assertions syntax to use. When not specified, @babel/generator will try to match the style in the input code based on the AST shape.
Optional jsescOptions for outputting jsesc representation.
Optional compact?: booleanThe compact option takes a boolean value (true or false), and defaults to true (enabled). When enabled, the output for arrays and objects is as compact as possible; it’s not formatted nicely.
Optional es6?: booleanThe es6 option takes a boolean value (true or false), and defaults to false (disabled). When enabled, any astral Unicode symbols in the input are escaped using ECMAScript 6 Unicode code point escape sequences instead of using separate escape sequences for each surrogate half. If backwards compatibility with ES5 environments is a concern, don’t enable this setting. If the json setting is enabled, the value for the es6 setting is ignored (as if it was false).
Optional escapeThe escapeEverything option takes a boolean value (true or false), and defaults to false (disabled). When enabled, all the symbols in the output are escaped — even printable ASCII symbols.
Optional indent?: stringThe indent option takes a string value, and defaults to '\t'. When the compact setting is enabled (true), the value of the indent option is used to format the output for arrays and objects.
Optional indentThe indentLevel option takes a numeric value, and defaults to 0. It represents the current indentation level, i.e. the number of times the value of the indent option is repeated.
Optional isThe isScriptContext option takes a boolean value (true or false), and defaults to false (disabled). When enabled, occurrences of </script and </style in the output are escaped as </script and </style, and <!-- is escaped as \x3C!-- (or \u003C!-- when the json option is enabled). This setting is useful when jsesc’s output ends up as part of a
Optional string to add as a block comment at the end of the output file.