estraverse
npmv5.3.0ECMAScript JS AST traversal functions
Not recommended for new projects
No — estraverse should not be adopted for new projects. Last published 1780 days ago.
- AAdoption: grade A, Excellent.
158.3M downloads per week and 4 known dependents.
- FMaintenance: grade F, Failing.
Last published 1780 days ago.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 36 KB installed.
- ASupply chain: grade A, Excellent.
No install scripts, 3 maintainers, and a contained dependency surface.
- ALicense: grade A, Excellent.
BSD-2-Clause — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding estraverse to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Compatibility
- Node.js
- node >=4.0
- Module format
- CommonJS only
- TypeScript
- No bundled types
- Install scripts
- None
Quick start
A usage example from the estraverse README.
estraverse.traverse(ast, {
enter: function (node, parent) {
if (node.type == 'FunctionExpression' || node.type == 'FunctionDeclaration')
return estraverse.VisitorOption.Skip;
},
leave: function (node, parent) {
if (node.type == 'VariableDeclarator')
console.log(node.id.name);
}
});Dependencies
Declared by estraverse v5.3.0. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (11)
Used by
Popular packages that depend on estraverse.
ECMAScript scope analyzer for ESLint
A query library for ECMAScript AST using a CSS selector like query language.
ECMAScript AST recursive visitor
ECMAScript code generator
Relationship graph
Dependencies (left) and dependents (right) of estraverse.
Frequently installed together
BDD/TDD assertion library for node.js and the browser. Test framework agnostic.
ECMAScript parsing infrastructure for multipurpose analysis
An AST-based pattern checker for JavaScript.
Generates and consumes source maps
Constants and utilities about visitor keys to traverse AST.
ECMAScript parser
TypeScript definitions for estree
The semantic version parser used by npm.
ECMAScript AST recursive visitor
TypeScript definitions for esrecurse
An Esprima-compatible JavaScript parser built on Acorn
utility box for ECMAScript language tools
Release history
No releases in the last two years, typically about 24 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 5.3.0latest | 4 years ago | 36 KB | BSD-2-Clause |
| 5.2.0 | 6 years ago | 36 KB | BSD-2-Clause |
| 5.1.0 | 6 years ago | 36 KB | BSD-2-Clause |
| 5.0.0 | 6 years ago | 35 KB | BSD-2-Clause |
| 4.3.0 | 7 years ago | 35 KB | BSD-2-Clause |
| 4.2.0 | 10 years ago | — | BSD-2-Clause |
| 4.1.1 | 11 years ago | — | BSD-2-Clause |
| 4.1.0 | 11 years ago | — | BSD-2-Clause |
| 4.0.0 | 11 years ago | — | BSD-2-Clause |
| 3.1.0 | 11 years ago | — | BSD-2-Clause |
| 3.0.0 | 11 years ago | — | BSD-2-Clause |
| 2.0.0 | 11 years ago | — | BSD-2-Clause |
| 1.9.3 | 11 years ago | — | BSD-2-Clause |
| 1.9.1 | 11 years ago | — | BSD-2-Clause |
| 1.9.0 | 11 years ago | — | BSD-2-Clause |
Overview
estraverse is an npm package that eCMAScript JS AST traversal functions. It is extremely widely used, with about 158.3M downloads per week and 4 known dependents in the graph. The latest version is 5.3.0, released under the BSD-2-Clause license.
Who should use it
Teams working in the npm ecosystem who need eCMAScript JS AST traversal functions and value a battle-tested, widely-adopted solution.
When not to use it
Consider an alternative if you need to have first-class TypeScript types out of the box, or if a more actively-maintained option better fits your npm stack.
Pros
- Large, well-established user base (158.3M weekly downloads).
- Clear open-source license (BSD-2-Clause).
Cons
- No bundled TypeScript types (may require a separate @types package).
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Frequently asked questions
Should I use estraverse?
No — estraverse should not be adopted for new projects. Last published 1780 days ago.
How do I install estraverse?
Run `npm install estraverse` to add estraverse to your npm project.
What license is estraverse released under?
estraverse is distributed under the BSD-2-Clause license.
How popular is estraverse?
estraverse has approximately 158,257,519 downloads per week and 4 known dependent packages.
Is estraverse still maintained?
The most recent release of estraverse (v5.3.0) was published 4 years ago.
Does estraverse run install scripts?
No. estraverse does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.