Generating JS from AST


Are there any existing generators that can take an ESTree AST and create a string of JavaScript?

The use case I have in mind is to parse JavaScript using Acorn, modify the AST, then regenerate JavaScript.

If not, I’m happy to write it. Thanks!


I think escodegen is the most popular tool for this.