escodegen
ECMAScript code generator (by estools)
recast
JavaScript syntax tree transformer, nondestructive pretty-printer, and automatic source map generator (by benjamn)
SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
surveyjs.io
featured
escodegen | recast | |
---|---|---|
3 | 6 | |
2,620 | 4,825 | |
0.2% | - | |
1.2 | 5.8 | |
25 days ago | 24 days ago | |
JavaScript | TypeScript | |
BSD 2-clause "Simplified" License | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
escodegen
Posts with mentions or reviews of escodegen.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-05-07.
-
How to make your own programming language in JavaScript
What's cool about Esprima syntax is that there are tools that generate code based on their AST. An example is escodegen which takes Esprima AST as input and outputs JavaScript code. You can think that you can use just strings to generate code, but this solution will not scale. In this tutorial, I show only a single if statement but you will run into a lot of problems if you will have more complex code.
- Show HN: Monocle – bidirectional code generation library
-
Abstract Syntax Trees: They're Actually Used Everywhere -- But What Are They?
Unparse the modified AST back into Javascript: Escodegen
recast
Posts with mentions or reviews of recast.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2024-04-05.
-
What is an Abstract Syntax Tree in Programming?
GitHub | Website
-
[AskJS] Any good shortcuts for migrating off of enzyme?
If jscodeshift is confusing, I recommend looking into using recast directly, along with ast-types for AST traversal and its node factories. Inside your visitors, write some conditionals that check for the patterns you want to detect, then mutate the node passed to the visitor, or otherwise mutate the AST. Keep going until tests are passing.
-
Evan you on Svelte migration from Vue
I ended up writing my own codemod tool based on recast to automate most of the repetitive, mindless grunt work. Even with the tool shaving hundreds of hours off of the migration effort, there's still a huge amount of work left, since we need to find or create Vue 3-compatible alternatives of all of our Vue 2-only dependencies. Some of these dependencies (e.g. vee-validate) are used pretty ubiquitously too
-
Which library to use for AST manipulation?
I had great results with a combination of babel + recast. Babel is doing the job and Recast is mostly here to preserve the original style when printing code again. I animated a workshop @ Node.JS Montréal 2019 that was recorded here. We cover the parse/transform/print of code using Babel (live coding starts around 45').
-
JARVIS – Write me a Codemod
recast
- Show HN: Monocle – bidirectional code generation library
What are some alternatives?
When comparing escodegen and recast you can also consider the following projects:
esprima - ECMAScript parsing infrastructure for multipurpose analysis
espree - An Esprima-compatible JavaScript parser
Acorn - A small, fast, JavaScript-based JavaScript parser
astring - 🌳 Tiny and fast JavaScript code generator from an ESTree-compliant AST.
jscodeshift - A JavaScript codemod toolkit.
estree - The ESTree Spec
ast-node-finder - AST Node Find api automatically generated from code
estraverse - ECMAScript JS AST traversal functions
ts-lite - Compiled TypeScript. Generates Go, Swift, Kotlin, WASM, Binary
jquery.terminal - jQuery Terminal Emulator - JavaScript library for creating web-based terminals with custom commands
openapi-preprocessor - An authoring tool for OpenAPI specifications