# benjamn/ast-types

Esprima-compatible implementation of the Mozilla JS Parser API

Repository: https://github.com/benjamn/ast-types
Canonical: https://ross.abutalabs.com/products/ast-types
Language: TypeScript
License: MIT
License Family: permissive
Last push: 2026-08-31T09:53:16+00:00

## Health v2 (maintenance only)
Score: 100/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 100, release rhythm 100, longevity 100
- inputs: {"age_days": 4879, "days_push": 2, "days_rel": 3, "gap_med": 0, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1173, forks 194 (observed 2026-09-01T02:13:59.164159+00:00)

## What it is
A TypeScript library providing an Esprima-compatible implementation of the Mozilla JS Parser API abstract syntax tree type hierarchy. It offers builders, type checking, and AST traversal utilities for constructing, inspecting, and manipulating JavaScript AST nodes.

## Use cases
- build and validate JavaScript AST nodes programmatically
- traverse and enumerate fields of syntax tree nodes
- write codemods that transform JavaScript source
- type-check AST nodes against the Mozilla Parser API hierarchy
- build custom JavaScript linters or transpilers
- construct synthetic code structures for testing

## When to choose
- you need a robust, well-typed AST type system for JavaScript tooling
- you are building code transformation or analysis tools like recast-based codemods
- you want Esprima/Mozilla Parser API compatibility with builders and traversal helpers

## When to avoid
- you need to parse source code itself (use a parser like Esprima, Babel, or Acorn alongside it)
- you are working with non-JavaScript languages
- you need a high-level transformation framework rather than AST primitives

## Facets
- artifact type: library
- maturity: stable
- function: parser, type-system, developer-tools
- domain: parsers, programming-languages, developer-tools, web-development
- platform: -
- tags: ast, abstract-syntax-tree, esprima, mozilla-parser-api, javascript, typescript, code-transformation, type-checking, nodejs

## Member repositories
- benjamn/ast-types (main) score 100

## Provenance
- Observed fields: from GitHub, fetched 2026-09-01T02:13:59.164159+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:28:21.704102+00:00, confidence not recorded.
  - readme: https://github.com/benjamn/ast-types (fetched 2026-09-01T02:13:59.164159+00:00, sha 310dae190387)
  - registry_npm: https://registry.npmjs.org/ast-types (fetched 2026-08-29T12:33:37.255016+00:00, sha 33d364bf8f40)
- Data as of 2026-08-30T08:39:29.467469+00:00.
