Escaya code generator
Lightweight and blazing fast JavaScript code generator from an EScaya-compliant AST.
WIP!
Features
- Generates JavaScript code up to ECMAScript® 2021
- Generated output is 98 % identical to the input.
- Supports code compression (minification)
- Supports source map
- Supports incremental code generation
- Performance
- Low memory usage
API
The Escaya-codegen
generates JavaScript code up to ECMAScript® 2021, and it has been implemented into the esbeautify library and uses the Escaya parser to parse the source code before printing the result.
The code can be generated incrementally while writing it, and the output will be the same as the input if the AST is correct.
Only a semicolon - ;
- will be inserted as an replacement for line breaks if minified, and line breaks will be ignored if the generated
input doesn't trigger an ASI failure.
Code formatting changes can be done if you set the options for it.
Options
Example usage:
; ; produces the string 'class x { static set x(y) {} }'