{"library":"ast-types","type":"library","category":null,"description":"ast-types is a foundational JavaScript library that provides an Esprima-compatible implementation of the Mozilla JavaScript Parser API, specifically designed for working with Abstract Syntax Trees (ASTs). It offers a robust and modular type hierarchy for representing JavaScript code as a tree structure, enabling efficient analysis, transformation, and code generation. The current stable version is `0.14.2`. While widely adopted as a dependency in many JavaScript tooling projects (e.g., Recast, Babel), it maintains a very slow release cadence, suggesting a mature and largely feature-complete state. Key differentiators include its `namedTypes` object for type-safe AST node inspection, `builders` for programmatic AST construction, and a powerful `visit` abstraction for tree traversal and modification. It provides a low-level, high-performance API for direct AST manipulation, often used in transpilers, linters, and code formatters.","language":"javascript","status":"active","version":"0.14.2","tags":["javascript","ast","abstract syntax tree","hierarchy","mozilla","spidermonkey","parser api","esprima","types","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install ast-types","imports":["import { namedTypes as n } from 'ast-types';","import { builders as b } from 'ast-types';","import { visit } from 'ast-types';"]},{"cmd":"yarn add ast-types","imports":[]},{"cmd":"pnpm add ast-types","imports":[]}],"homepage":null,"github":"https://github.com/benjamn/ast-types","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/ast-types","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/ast-types/compatibility"}}