benjamn/recast
JavaScript syntax tree transformer, nondestructive pretty-printer, and automatic source map generator observed · 2026-08-28
Health v2 · maintenance only
67/100
- Activity 98
- Release rhythm 8
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 5094
- days_rel: n/a
- days_push: 12
- n_releases_24m: 0
Adoption not part of the score
5255 stars · 363 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
Recast is a JavaScript syntax tree (AST) transformer and nondestructive pretty-printer that preserves original formatting where possible. It also generates source maps automatically when reprinting modified syntax trees.
Use cases
- write codemods that refactor JavaScript code automatically
- transform a JavaScript AST and reprint it without losing formatting
- generate source maps for code transformations
- parse and manipulate JavaScript source code programmatically
- build custom linters or code analysis tools
- migrate legacy JavaScript syntax to newer standards
When to choose
- you need to modify JavaScript code while preserving original formatting and comments
- you are building codemods or automated refactoring tools
- you need automatic source map generation for transformed code
- you want a stable, widely-used AST manipulation library
When to avoid
- you only need to parse JavaScript without reprinting it
- you are transforming non-JavaScript languages
- you need a full-featured bundler or transpiler rather than an AST transformer
Facets
library · maturity stable
parser serialization developer-tools parsers developer-tools programming-languages ast source-maps codemod pretty-printer javascript nodejs
1 source
- readme: https://github.com/benjamn/recast · fetched 2026-08-28 · c87ac830fd14
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| benjamn/recast | main | 67 |
For agents
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem