ECMAScript code generator that transforms Mozilla's Parser API ASTs back into executable JavaScript code
Overall
score
95%
Format presets (FORMAT_DEFAULTS and FORMAT_MINIFY)
Uses escodegen.generate
100%
100%
Uses FORMAT_DEFAULTS
100%
100%
Uses FORMAT_MINIFY
100%
100%
Readable output quality
100%
100%
Minified output quality
100%
100%
AST to JavaScript code generation
Uses generate() function
100%
100%
Basic AST handling
100%
100%
Formatting options
100%
100%
Default formatting
100%
100%
Correct output
100%
100%
Number optimization (renumbering and hexadecimal conversion)
Uses escodegen.generate
100%
100%
Compact format option
100%
100%
Renumber option enabled
100%
100%
Hexadecimal option enabled
100%
100%
Advanced comment preservation with spacing and indentation
Uses escodegen.generate()
100%
100%
Uses escodegen.attachComments()
100%
100%
Enables comment option
100%
100%
Multiline comment adjustment
100%
100%
Blank line preservation
100%
100%
Provides sourceCode
100%
100%
Mozilla-specific extensions
Import escodegen
100%
100%
Use generate function
100%
100%
Pass options object
100%
100%
Configure moz option
100%
40%
Set starlessGenerator
100%
0%
Return generated code
100%
100%
Comprehensive JavaScript syntax support (ES5-ES2021+)
Import escodegen
100%
100%
Use generate function
100%
100%
Arrow function AST
100%
100%
Async/await AST
100%
100%
Optional chaining AST
100%
100%
Class syntax AST
100%
100%
RegExp generation with Unicode handling
Uses escodegen.generate
100%
100%
Handles Literal nodes
100%
100%
Unicode escaping applied
100%
100%
Preserves flags correctly
100%
100%
Code formatting control (indentation, whitespace, quotes)
Uses escodegen.generate()
100%
100%
Indentation style control
100%
100%
Quote style control
100%
100%
Compact formatting
100%
100%
Base indentation control
100%
100%
Correct option structure
100%
100%
Precedence-based parenthesization
Uses escodegen.generate
0%
100%
Passes parentheses option
0%
100%
Handles AST input
0%
100%
Leverages precedence handling
0%
80%
Context-aware code generation with flag system
Uses escodegen.generate
95%
100%
Context flag handling
44%
88%
For-loop context awareness
96%
100%
Directive context handling
60%
66%
AST traversal for detection
93%
93%
Install with Tessl CLI
npx tessl i tessl/npm-escodegen